CyberSecBulletin
CVE-2026-39860NVD status: Analyzed

nix: UNIX Symbolic Link (Symlink) Following

CVE-2026-39860 is a high-severity UNIX symbolic link (symlink) following vulnerability in nix from NixOS, with a CVSS 3.1 base score of 8.4 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. Affected nix versions: >= 2.21, < 2.28.6; >= 2.29.0, < 2.29.3; >= 2.30.0, < 2.30.4, and others listed below. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.2% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Check which version of nix you run against the affected versions below, and install the vendor's latest release.
  2. Read the advisory on github.com for workarounds and exact fixed builds.

Affected products and versions

VendorProductAffected versionsFixed in
NixOSnix>= 2.21, < 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; >= 2.20.5, <= 2.20.9; and 2 more rangesNot stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N. Scored by NVD.

Scoring systemScoreSeverityScored by
CVSS 3.19.0CriticalCNA (github.com)
CVSS 3.18.4HighNVD

Official description

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 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.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: UNIX Symbolic Link (Symlink) Following

The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.

How developers prevent this class of flaw

  • Symbolic link attacks often occur when a program creates a tmp directory that stores files/links. Access to the directory should be restricted to the program as to prevent attackers from manipulating the files.
  • Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

More UNIX Symbolic Link (Symlink) Following vulnerabilities (CWE-61)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in nix

All nix vulnerabilities

Recent UNIX Symbolic Link (Symlink) Following vulnerabilities

Spotted an error? Tell us.