CVE-2024-27297
What it is
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.
At a glance
- Exploitability
- Can be exploited from the same network segment with a low-privilege account. High risk of data tampering.
- Exploit odds
- 0.6% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.6% in the next 30 days (EPSS).
- Severity: 6.3 MEDIUM (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.6% · EPSS, next 30 days
- Weakness
- CWE-367
- Record status
- Modified
Affected
- Nixos Nix < 2.3.18
- Nixos Nix < 2.18.2
- Nixos Nix < 2.19.4
- Nixos Nix < 2.20.5
Attack profile CVSS 3.1 · 6.3
- Attack vector
- Adjacent network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- Low
Raw vector
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2024-27297.md and follow it. Check whether this project is affected by CVE-2024-27297. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/NixOS/nix/commit/f8170ce9f119e5e6724eb81ff1b5a2d4c0024000
- https://github.com/NixOS/nix/security/advisories/GHSA-2ffj-w4mj-pg37
- https://github.com/NixOS/nix/commit/f8170ce9f119e5e6724eb81ff1b5a2d4c0024000
- https://github.com/NixOS/nix/security/advisories/GHSA-2ffj-w4mj-pg37
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