CVE-2024-27297 json
Nix Corruption of fixed-output derivations
published 2y ago modified 4mo ago also EUVD-2024-24524
- cvss
- 6.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 48%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- nixos nix 2.3.18, 2.18.2, 2.19.4, 2.20.5
- nix Debian 14, Debian 13 2.22.1+dfsg-1
debian advisories DEBIAN-CVE-2024-27297
- nix Ubuntu Pro 24.04 LTS 2.18.1+dfsg-1ubuntu5+esm2
- guix Ubuntu Pro 22.04 LTS 1.3.0-4ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2024-27297
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- nix Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 2.20.5-r0
- guix Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 1.4.0-r5
alpine advisories ALPINE-CVE-2024-27297
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/NixOS/nix@f8170ce commit
Is CVE-2024-27297 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2y ago
Exploit prediction
0.59% chance of exploitation in the next 30 days, higher than 48% of all scored CVEs (FIRST EPSS, 2026-11-11).
Exploits and checks
- hackmd.io https://hackmd.io/03UGerewRcy3db44JQoWvw referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.3 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L |
| NVD | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected products
- NixOS nix
Classification
- Weakness
-
- CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
References
Sources
- CVE List CVE-2024-27297
- NVD CVE-2024-27297
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.