CVE-2026-39860: Nix symlink following vulnerability in build output registration

CVE-2026-39860 · Severity: critical · CVSS 9 · Published 2026-04-08

Nix is a package manager used to automate software builds and deployments. A security flaw in how it handles temporary files during the build process allows a local user to trick the system into overwriting sensitive files on the host computer. In many configurations, this allows a standard user to gain full administrative (root) control over the entire system.

Quick answers

Is CVE-2026-39860 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-39860 being exploited in the wild.
How severe is CVE-2026-39860?
Critical severity, with a CVSS score of 9, published 8 April 2026.
Which products and versions are affected?
NixOS nix >= 2.18.2, < 2.28.6; >= 2.29.0, < 2.29.3; >= 2.30.0, < 2.30.4; >= 2.31.0, < 2.31.4; >= 2.32.0, < 2.32.7; >= 2.33.0, < 2.33.4; >= 2.34.0, < 2.34.5.
Is there a fix for CVE-2026-39860?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-39860 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-39860?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in the Nix daemon's fixed-output derivation (FOD) registration process. When Nix attempts to prevent file descriptor exfiltration by copying build outputs to a temporary '.tmp' path within the build chroot, it fails to validate if that path is a symbolic link. Because the Nix process performing the copy operates in the host mount namespace with root privileges, a malicious derivation builder can create a symlink at the expected temporary path pointing to a sensitive host file (e.g., /etc/shadow). During output registration, Nix follows the symlink and overwrites the target with the derivation's output. This allows any user authorized to submit builds to achieve local privilege escalation. The issue is fixed in versions 2.34.5, 2.33.4, 2.32.7, 2.31.4, 2.30.4, 2.29.3, and 2.28.6.

Affected products

  • NixOS nix >= 2.18.2, < 2.28.6; >= 2.29.0, < 2.29.3; >= 2.30.0, < 2.30.4; >= 2.31.0, < 2.31.4; >= 2.32.0, < 2.32.7; >= 2.33.0, < 2.33.4; >= 2.34.0, < 2.34.5

Timeline

  • 2026-04-08: advisory
  • 2026-04-08: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.