Netatalk Security Advisory

Subject Two-byte out-of-bounds write in Unicode path decomposition
CVE ID# CVE-2026-142061
Severity Moderate
Disclosure Date 2026/12/01
Affected Versions 3.1.0-4.5.2
Summary An exact-fill Unicode decomposition can write a UTF-16 terminator beyond a path buffer during Spotlight metadata generation

Description

decompose_w() checks that its destination has room for each decomposed character, but does not reserve space for the final UTF-16 NUL terminator. When decomposition fills the destination exactly, the terminator writes two zero bytes immediately beyond the buffer (CWE-787). A production caller, charset_decompose(), passes the full capacity of a fixed stack array to decompose_w() while processing filesystem paths for Spotlight metadata.

An authenticated AFP client can request fetchAttributes:forOIDArray:context: for a CNID that resolves to an existing path. A user who can create files or directories can influence that path. Reaching the boundary requires a path near the platform’s MAXPATHLEN limit and carefully chosen Unicode. For example, a valid MAXPATHLEN - 1 byte path containing one U+01D5 and MAXPATHLEN - 3 ASCII bytes decomposes to exactly MAXPATHLEN UTF-16 code units, leaving no room for the terminator. This makes exploitation high complexity.

The demonstrated harness write crosses a heap allocation; the identified Spotlight caller uses a stack array. A crash or other limited availability effect in the AFP session process is plausible, but has not been reproduced without AddressSanitizer. Information disclosure, meaningful data modification, privilege escalation, and code execution have not been demonstrated.

Patch Availability

Upgrade to Netatalk 4.6.0 or later, which includes the fix. Source builds can apply CVE-2026-142061.patch.

CVSS Calculation

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N (5.3)

Workaround

Disable Spotlight indexing in afp.conf:

[Global]
spotlight = no

Credits

Vulnerability reported by:

Pavel Kohout of Aisle Research

Patch developed by:

Daniel Markstedt of the Netatalk team

References

* GHSA-crqx-273q-43r2

Go back to the Security Policy.