CVE-2025-53819

7.9 HIGH

📋 TL;DR

Nix 2.30.0 on macOS executes builds with root privileges instead of designated build users, allowing malicious build scripts to gain full system control. This affects macOS users running Nix 2.30.0 for package builds. The vulnerability stems from improper privilege separation during build execution.

💻 Affected Systems

Products:
  • Nix package manager
Versions: 2.30.0 only
Operating Systems: macOS
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects macOS builds; Linux and other Unix systems are not vulnerable. Builds executed via Nix 2.30.0 on macOS are impacted.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise via malicious build scripts executing arbitrary code as root, leading to data theft, persistence installation, or system destruction.

🟠

Likely Case

Build-time supply chain attacks where malicious packages gain root access during installation, potentially compromising the entire system.

🟢

If Mitigated

Limited impact if builds only use trusted packages and scripts, though privilege escalation risk remains.

🌐 Internet-Facing: LOW - This primarily affects local build processes rather than network services.
🏢 Internal Only: HIGH - Build servers and developer workstations running affected Nix versions on macOS are at significant risk.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW - Exploitation requires running a malicious build script, which is straightforward for attackers controlling package sources.

Exploitation requires building packages with Nix 2.30.0 on macOS. The vulnerability is in the build execution mechanism itself.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.30.1

Vendor Advisory: https://github.com/NixOS/nix/security/advisories/GHSA-qc7j-jgf3-qmhg

Restart Required: No

Instructions:

1. Update Nix to version 2.30.1 or later using your package manager. 2. For macOS: Run 'nix-env -iA nixpkgs.nix' or use the official installer. 3. Verify the update with 'nix --version'.

🔧 Temporary Workarounds

No known workarounds

all

The advisory states no workarounds are available. Immediate patching is required.

🧯 If You Can't Patch

  • Avoid building packages with Nix 2.30.0 on macOS until patched
  • Use Linux or other Unix systems for builds instead of macOS

🔍 How to Verify

Check if Vulnerable:

Check if running Nix 2.30.0 on macOS: Run 'nix --version' and verify OS is macOS.

Check Version:

nix --version

Verify Fix Applied:

Confirm Nix version is 2.30.1 or later with 'nix --version' and ensure macOS builds now use proper build users.

📡 Detection & Monitoring

Log Indicators:

  • Build logs showing processes running as root instead of build users
  • Unexpected root privilege usage during package builds

Network Indicators:

  • Not applicable - local vulnerability

SIEM Query:

Not applicable - primarily local build process issue

🔗 References

📤 Share & Export