CVE-2026-39860: Nix sandbox escape: file write via symlink at FOD `.tmp` copy destination

Published Apr 8, 2026
·
Updated

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.

Affected Software

12 affected components
nix/nix<2.34.5, <2.33.4, <2.32.7, <2.31.4, <2.30.4, <2.29.3, <2.28.6
All of the following
Any of the following
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
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.34.5
  2. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.33.4
  3. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.32.7
  4. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.31.4
  5. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.30.4
  6. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.29.3
  7. Upgrade

    Upgrade Nix to a version that resolves this vulnerability.

    Fixed in 2.28.6

Event History

Apr 8, 2026
CVE Published
via MITRE·08:58 PM
Data Sourced
via MITRE·08:58 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-39860?

CVE-2026-39860 is considered a high-severity vulnerability due to its potential for arbitrary file overwriting.

2

How do I fix CVE-2026-39860?

To fix CVE-2026-39860, update to versions of Nix higher than 2.34.5, 2.33.4, and so on as listed in the affected software.

3

Which versions of Nix are affected by CVE-2026-39860?

CVE-2026-39860 affects Nix versions prior to 2.34.5, including 2.33.4, 2.32.7, 2.31.4, and others specified in the advisory.

4

What is the impact of CVE-2026-39860?

The impact of CVE-2026-39860 includes the possibility of unauthorized file modifications through a symlink attack.

5

Is it safe to use versions of Nix before the patch for CVE-2026-39860?

No, using versions of Nix before the patch for CVE-2026-39860 is unsafe as they are vulnerable to file overwrite attacks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203