1. Archivio CVE
  2. 2026
  3. CVE-2026-39860

CVE-2026-39860

8.4 Gravità alta CVSS v3.1 · fonte NVD CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N 8.4 – Alta

Descrizione

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.

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
nixos nix >= 2.18.2 <= 2.18.9 –
nixos nix >= 2.19.4 <= 2.19.7 –
nixos nix >= 2.20.5 <= 2.20.9 –
nixos nix >= 2.21.0 < 2.28.6 –
nixos nix >= 2.29.0 < 2.29.3 –
nixos nix >= 2.30.0 < 2.30.4 –
nixos nix >= 2.31.0 < 2.31.4 –
nixos nix >= 2.32.0 < 2.32.7 –
nixos nix >= 2.33.0 < 2.33.4 –
nixos nix >= 2.34.0 < 2.34.5 –
Tutte le 21 vulnerabilità di Nixos Nix

Tipo di vulnerabilità

CWE-61 UNIX Symbolic Link (Symlink) Following

The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.

Impatto sui sistemi

AmbitoImpatto
Riservatezza, Integrità Leggere file o cartelle, Modificare file o cartelle

Come si previene

Sviluppo Symbolic link attacks often occur when a program creates a tmp directory that stores files/links. Access to the directory should be restricted to the program as to prevent attackers from manipulating the files.
Architettura e progettazione · Separazione dei privilegi Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 129 CVE di tipo CWE-61, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org