Time-of-check Time-of-use (TOCTOU) Race Condition in nix - CVE-2026-64846
Published: October 15, 2026
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.