2.8low
Nix: Arbitrary file truncation outside the sandbox with recursive-nix experimental feature
- Severity
- 2.8low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.09% (higher than 0% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
Nix is a package manager for Linux and other Unix systems. Prior to 2.35.0, a malicious derivation executed with the recursive-nix experimental feature can exploit a time-of-check/time-of-use race involving final symlink handling in the LocalStore restore path. The race can cause writeFile to follow a substituted final symlink when opening a path with O_TRUNC instead of enforcing FinalSymlink::DontFollow, allowing the Nix process or nix-daemon to create or truncate an empty file outside the build sandbox with the daemon user's permissions. The primitive does not provide arbitrary-content writes and requires winning the race. This issue is fixed in version 2.35.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| NixOS nix | < 2.35.0 | CVE List |
Classification
What each source says
CVE List
Nix is a package manager for Linux and other Unix systems. Prior to 2.35.0, a malicious derivation executed with the recursive-nix experimental feature can exploit a time-of-check/time-of-use race involving final symlink handling in the LocalStore restore path. The race can cause writeFile to follow a substituted final symlink when opening a path with O_TRUNC instead of enforcing FinalSymlink::DontFollow, allowing the Nix process or nix-daemon to create or truncate an empty file outside the build sandbox with the daemon user's permissions. The primitive does not provide arbitrary-content writes and requires winning the race. This issue is fixed in version 2.35.0.
NVD (es)
Nix es un gestor de paquetes para Linux y otros sistemas Unix. Antes de la 2.35.0, una derivación maliciosa ejecutada con la característica experimental recursive-nix puede exploit una condición de carrera de tiempo de verificación/tiempo de uso que involucra el manejo de symlinks finales en la ruta de restauración de LocalStore. La condición de carrera puede hacer que writeFile siga un symlink final sustituido al abrir una ruta con O_TRUNC en lugar de aplicar FinalSymlink::DontFollow, permitiendo que el proceso Nix o nix-daemon cree o trunque un archivo vacío fuera de la sandbox de construcción con los permisos del usuario del demonio. La primitiva no proporciona escrituras de contenido arbitrario y requiere ganar la condición de carrera. Este problema está solucionado en la versión 2.35.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-64846 changed 2026-08-20 | CVE Terms of Use |
| NVD | CVE-2026-64846 changed 2026-10-18 | Public domain |