What’s Vulnerable › Vulnerabilities
CVE-2024-27297: Nix Corruption of fixed-output derivations
- Severity: medium (CVSS 5.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-03-11 · updated 2026-06-17
- Weakness: CWE-367
Description
Nix is a package manager for Linux and other Unix systems. A fixed-output derivations on Linux can send file descriptors to files in the Nix store to another program running on the host (or another fixed-output derivation) via Unix domain sockets in the abstract namespace. This allows to modify the output of the derivation, after Nix has registered the path as "valid" and immutable in the Nix database. In particular, this allows the output of fixed-output derivations to be modified from their expected content. This issue has been addressed in versions 2.3.18 2.18.2 2.19.4 and 2.20.5. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected products
- NixOS Nix: before 2.3.18; from 2.4 before 2.18.2; from 2.19.0 before 2.19.4; from 2.20.0 before 2.20.5 — fixed in 2.18.2, 2.19.4, 2.20.5, 2.3.18
How to fix
Upgrade to a fixed version: NixOS Nix 2.18.2, 2.19.4, 2.20.5, 2.3.18. Check the vendor advisory for mitigations.
References
- https://github.com/NixOS/nix/commit/f8170ce9f119e5e6724eb81ff1b5a2d4c0024000
- https://github.com/NixOS/nix/security/advisories/GHSA-2ffj-w4mj-pg37
- https://hackmd.io/03UGerewRcy3db44JQoWvw
- https://github.com/NixOS/nix/commit/f8170ce9f119e5e6724eb81ff1b5a2d4c0024000
- https://github.com/NixOS/nix/security/advisories/GHSA-2ffj-w4mj-pg37
- https://guix.gnu.org/en/blog/2025/privilege-escalation-vulnerabilities-2025/
- https://hackmd.io/03UGerewRcy3db44JQoWvw
Get alerted when CVE-2024-27297 or the next vulnerability affects your stack