Netatalk Security Advisory

Subject Root file permission change via symlinked SQLite CNID database
CVE ID# CVE-2026-142087
Severity High
Disclosure Date 2026/12/04
Affected Versions 4.5.0-4.6.0
Summary A local user can redirect a root-privileged permission change to an arbitrary file through a symlink in the SQLite CNID directory

Description

The SQLite CNID backend creates or normalizes its database directory with sticky, world-writable permissions (01777). The sticky bit prevents users from deleting entries owned by others, but still lets a local user create an entry with an unused name. cnid_sqlite_open() forms a predictable database path from the volume’s local name and, while running as root, calls chmod() on that path with mode 0666. Because chmod() follows symbolic links, an attacker who places a symlink at <volume>.sqlite before database initialization can make Netatalk change the permissions of its target instead of the CNID database file. The same pathname-based permission change applies to the predictable <volume>.sqlite-wal and <volume>.sqlite-shm companion files when either entry is absent.

Exploitation requires a local unprivileged user who can create entries in the CNID directory, knowledge of the volume-derived filename, and suitable timing before database initialization or an absent companion file. It also requires the platform to permit the privileged process to follow the attacker-created symlink. Kernel symlink protections can prevent this attack under a protected configuration. The issue affects installations using the SQLite CNID backend; it is not directly exploitable over AFP alone.

The resulting 0666 mode makes a targeted root-owned file world-readable and world-writable. Depending on the target, this can disclose protected data, allow modification of security-sensitive configuration or authentication files, cause denial of service, or lead to local privilege escalation.

Patch Availability

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

CVSS Calculation

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

Workaround

Until upgraded, avoid the SQLite CNID backend on hosts with untrusted local users. Configure affected volumes to use another CNID backend, such as mysql:

[Volume]
cnid scheme = mysql

Credits

Vulnerability reported by:

Pavel Kohout of Aisle Research

Patch developed by:

Daniel Markstedt of the Netatalk team

References


Go back to the Security Policy.