Vulnerability · Published Mar 11, 2024 · Assigned by GitHub_M

CVE-2024-27297Nix Corruption of fixed-output derivations

Medium 6.3

In plain English

A medium-severity security flaw in nix from NixOS. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.3Medium
Exploit odds (30 days)0.6%top 51.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20guix1.4.0-r5ALPINE-CVE-2024-27297
Alpine:v3.21guix1.4.0-r5ALPINE-CVE-2024-27297
Alpine:v3.22guix1.4.0-r5ALPINE-CVE-2024-27297
Alpine:v3.23guix1.4.0-r5ALPINE-CVE-2024-27297
Alpine:v3.24guix1.4.0-r5ALPINE-CVE-2024-27297
Alpine:v3.20nix2.20.5-r0ALPINE-CVE-2024-27297
Alpine:v3.21nix2.20.5-r0ALPINE-CVE-2024-27297
Alpine:v3.22nix2.20.5-r0ALPINE-CVE-2024-27297
Alpine:v3.23nix2.20.5-r0ALPINE-CVE-2024-27297
Alpine:v3.24nix2.20.5-r0ALPINE-CVE-2024-27297
Debian:12guix1.4.0-3+deb12u1DSA-5669-1
Debian:12nixno fix listedDEBIAN-CVE-2024-27297
Debian:13nix2.22.1+dfsg-1DEBIAN-CVE-2024-27297
Debian:14nix2.22.1+dfsg-1DEBIAN-CVE-2024-27297

Affected products (as reported)

VendorProductVersions
NixOS nix >= 2.3.0, < 2.3.18>= 2.4.0, < 2.18.2>= 2.19.0, < 2.19.4>= 2.20.0, < 2.20.5

Weakness: CWE-367 · Vector: CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

References