Cyber Resilience

CVE-2026-39860

Nixos Nix 2.18.2 – 2.18.9

Published
08 April 2026
Modified
24 July 2026
Patch / advisory
CVSS Score v3.1 9.0
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
EPSS Score 0.0019 9th percentile
Risk Priority 61 floored blend · peak EPSS

Summary

CVE-2026-39860 is a critical-severity UNIX Symbolic Link (Symlink) Following (CWE-61) vulnerability in Nixos Nix. Its CVSS base score is 9.0 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Path Interception (T1034); ranked at the 9th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and AC-4 (Information Flow Enforcement) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-39860 is a symlink following vulnerability (CWE-61) in the Nix package manager for Linux and other Unix systems, stemming from a bug in the fix for CVE-2024-27297. It affects sandboxed Linux builds during fixed-output derivation output registration, where the temporary output path resides inside the build chroot. A malicious derivation builder can create a symlink at that path pointing to an arbitrary filesystem location writable by the Nix process, typically the root-owned Nix daemon in multi-user installations. Sandboxed macOS builds are unaffected. The vulnerability carries a CVSS v3.1 base score of 9.0 (AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N).

Any local user able to submit builds to the Nix daemon—who, by default, includes all users in multi-user setups—can exploit this to achieve arbitrary file overwrites. By crafting a fixed-output derivation that places a symlink in the chrooted temporary output directory, the attacker tricks the host Nix process (operating outside the chroot in the host mount namespace) into following the symlink during output registration. This copies the derivation's output contents to the targeted location, enabling modification of sensitive root-writable files and potential root privilege escalation.

Mitigation requires updating to a patched Nix version: 2.34.5, 2.33.4, 2.32.7, 2.31.4, 2.30.4, 2.29.3, or 2.28.6. Relevant patches are available in NixOS/nix GitHub commits such as 244f3eee0bbc7f11e9b383a15ed7368e2c4becc9, 4bc5a3510fa3735798f9ed3a2a30a3ea7b32343a, 7794354a982449927ee7401cdeb573ddd16c4688, and a3163b9eabb952b4aa96e376dea95ebcca97b31a, along with pull request 10178.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Nix is a package manager for Linux and other Unix systems. A bug in the fix for CVE-2024-27297 allowed for arbitrary overwrites of files writable by the Nix process orchestrating the builds (typically the Nix daemon running as root in…

more

multi-user installations) by following symlinks during fixed-output derivation output registration. This affects sandboxed Linux builds - sandboxed macOS builds are unaffected. The location of the temporary output used for the output copy was located inside the build chroot. A symlink, pointing to an arbitrary location in the filesystem, could be created by the derivation builder at that path. During output registration, the Nix process (running in the host mount namespace) would follow that symlink and overwrite the destination with the derivation's output contents. In multi-user installations, this allows all users able to submit builds to the Nix daemon (allowed-users - defaulting to all users) to gain root privileges by modifying sensitive files. This vulnerability is fixed in 2.34.5, 2.33.4, 2.32.7, 2.31.4, 2.30.4, 2.29.3, and 2.28.6.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1034 Path Interception Persistence
**This technique has been deprecated.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2025-33225Same product: Linux Linux Kernel
CVE-2024-0134Same product: Linux Linux Kernel
CVE-2024-46744Same product: Linux Linux Kernel
CVE-2024-43882Same product: Linux Linux Kernel
CVE-2024-50234Same product: Linux Linux Kernel
CVE-2024-50220Same product: Linux Linux Kernel
CVE-2023-52478Same product: Linux Linux Kernel
CVE-2026-43570Shared CWE-61
CVE-2026-22767Shared CWE-61
CVE-2024-22014Shared CWE-61

Affected Assets

nixos
nix
2.18.2 — 2.18.9 · 2.19.4 — 2.19.7 · 2.20.5 — 2.20.9

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 2 hardening rules · 2 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V5.2.5

Mitigating Controls (NIST 800-53 r5) AI

Access enforcement must resolve the actual target of any file reference and apply authorizations to it, directly stopping symlink traversal to unauthorized objects.

Information-flow enforcement on file operations must follow the resolved target rather than the link name, blocking unauthorized data movement via symlinks.

Least-privilege restrictions on the directories that may contain links or targets reduce the set of files an attacker can reach even if a symlink is followed.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 mostly match
prevents

Secure SDLC practices directly prevent introduction of symlink-following flaws in file-handling code.

ID.RA-01 partial match
prevents

Vulnerability identification can discover existing symlink issues but does not prevent or remediate them in code.

PR.AA-05 partial match
prevents

Least-privilege access policies can limit damage from symlink attacks but do not address the coding flaw itself.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can detect symlink-following vulnerabilities before deployment, covering most of the weakness.

prevents

Secure-architecture principles require safe file-handling and canonicalization, directly addressing symlink attacks.

prevents

Secure-coding standards mandate explicit symlink checks and safe open patterns, fully mitigating CWE-61.

mitigates

Access-control rules can restrict which files a process may open, reducing symlink-following risk but not eliminating the underlying path-resolution flaw.

none

Configuration management can enforce safe file-permission baselines that limit symlink abuse, but does not address the code flaw itself.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (1 rule)
  • V-248577 OL 8 must enable kernel parameters to enforce Discretionary Access Control (DAC) on symlinks. prevents CWE-61

References