| Name | CVE-2026-39860 |
| 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 | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
| Debian Bugs | 1133004 |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| nix (PTS) | bullseye | 2.3.7+dfsg1-1 | vulnerable |
| bookworm | 2.8.0-1.1 | vulnerable | |
| trixie | 2.26.3+dfsg-1 | vulnerable | |
| forky, sid | 2.34.6+dfsg-1 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| nix | source | (unstable) | 2.34.6+dfsg-1 | 1133004 |
[bullseye] - nix <postponed> (regresssion of postponed CVE-2024-27297; revisit when fixing CVE-2024-27297)
https://github.com/NixOS/nix/security/advisories/GHSA-g3g9-5vj6-r3gj
Introduced with: https://github.com/NixOS/nix/commit/a3163b9eabb952b4aa96e376dea95ebcca97b31a (2.21.0)
Fixed by: https://github.com/NixOS/nix/commit/44017ca497c8b44d5dac179f5afc63e91fe45ed6 (master)
Fixed by: https://github.com/NixOS/nix/commit/a760af86b3a42aa5ac9d9002929107fe357bf128 (master)
Fixed by: https://github.com/NixOS/nix/commit/0e3412a93f43a017342c267000c152e5c45327e7 (master)
Fixed by: https://github.com/NixOS/nix/commit/23c7a6490a829a978af1acd56d76cc2dee7f4ad6 (2.34.5)
Fixed by: https://github.com/NixOS/nix/commit/d1f2de7d683bef1e2a164f23f33172c79c7725ea (2.34.5)
Fixed by: https://github.com/NixOS/nix/commit/2f13ee6dc4ade1d919c14757891d5d8a1001eee8 (2.34.5)
CVE exists for guix because the fix for CVE-2024-27297 introduces the issue.
check, potentially affecting guix if same issue in backporting fix for CVE-2024-2729