Impact
A time‑of‑check/time‑of‑use race in Nix’s LocalStore restore path allows a malicious derivation using the recursive‑nix experimental feature to cause the process to follow a substituted final symlink when opening a path with O_TRUNC. This enables the Nix process or nix‑daemon to create or truncate an empty file outside the build sandbox with the daemon user’s permissions, compromising file integrity but not allowing arbitrary content writes.
Affected Systems
Nix package manager from NixOS, all versions prior to 2.35.0 are affected. The fix was introduced in 2.35.0.
Risk and Exploitability
The CVSS score of 2.8 indicates low severity. EPSS is not available, suggesting a low exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires local execution as the nix‑daemon user or influence over a build that enables the recursive‑nix feature, along with successful timing to win the race during final symlink resolution. The attack is local and constrained to the daemon’s privileges.
OpenCVE Enrichment