Time-of-check Time-of-use (TOCTOU) Race Condition in nix - CVE-2026-64846

 

Time-of-check Time-of-use (TOCTOU) Race Condition in nix - CVE-2026-64846

Published: October 15, 2026


Vulnerability identifier: #VU155867
CSH Severity: Low
CVSS v4: 2 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-64846
CWE-ID: CWE-367
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a local user to truncate arbitrary files or create empty files outside the build sandbox.

The vulnerability exists due to a time-of-check time-of-use (TOCTOU) race condition in the recursive-nix experimental feature when processing a malicious derivation. A local user can exploit the race condition through a malicious derivation to truncate arbitrary files or create empty files outside the build sandbox.

Exploitation requires the recursive-nix experimental feature to be enabled. File operations occur with the permissions of the user running the nix process or nix-daemon.


Affected software

nix

How to mitigate CVE-2026-64846

Install security update from vendor's website.

nix - update to 2.35.0

External References

Related Security Bulletins