Skip to content

Nix and Lix patch daemon flaws that allow local root

Nix and Lix disclosed flaws on October 13 that can be chained into root access. Fixes are in Nix 2.35.3 and Lix 2.95.4, among other patch releases.

By Tech AI Wire Team

3 min read

XLinkedIn
The GitHub security advisory GHSA-jwvx-xq5j-gc56 for nix-daemon, marked High with a severity of 8.4 out of 10, listing affected and patched Nix versions.

By the numbers

CVSS score of the most serious Nix flaw
8.4
Nix security advisories published on October 13
5
Nix release that introduced the repair flaw
2.1

The Nix and Lix projects jointly disclosed security flaws on October 13, 2026 that can be chained into root access on machines running their package-building daemons. Fixed releases came out the same day. Any multi-user Nix or Lix setup where untrusted users can reach the daemon should upgrade now.

Nix is a package manager and build system that underpins the NixOS Linux distribution. Lix is a separate implementation of Nix. Both run a background service, the daemon, that builds software on behalf of local users.

The flaws

The joint advisory on NixOS Discourse lists several issues. The most serious lets a local user corrupt files that later run as root.

IssueWho is affectedSeverity
Unprivileged "repair" requests can replace store files before they are checkedMulti-user installs on Linux and macOSHigh, 8.4 out of 10 (Nix advisory)
Integer overflow in builtins.genList causes a heap memory writeSystems that evaluate untrusted Nix codeModerate
macOS sandbox escape when a build's sandbox profile grows past a size limitmacOS with sandbox = true or relaxedModerate
Multi-user installer leaves store files owned by the installing userFresh installs through the scripted installer; NixOS is not affectedModerate, 5.6
Daemon accepts connections from build usersmacOS and FreeBSD; Linux is not affectedLow, 3.8

The Nix side has published five GitHub advisories. None has a CVE number yet.

How the root escalation works

The main bug sits in how the daemon adds files to the Nix store, the directory where all built software lives. According to the Nix advisory GHSA-jwvx-xq5j-gc56, the daemon unpacked an uploaded archive straight into its final store path. It checked the archive's hash only afterward.

Vulnerable versions also let untrusted users request a "repair", which replaces an existing store path. If the hash check failed, the malicious files stayed on disk. When the daemon runs as root, the advisory says, any user listed in allowed-users could execute code as root.

The flaw dates back to Nix 2.1, which added streaming uploads. The fix bars untrusted users from repair mode. It also unpacks uploads into a private temporary folder and moves them into place only after the hash checks out.

The advisory credits Guthrie McAfee Armstrong and a researcher known as joaoviictorti for finding it.

Which versions to install

ProjectFixed versions
Nix2.35.3, 2.34.9, 2.31.6, 2.30.6, 2.28.8
Lix2.95.4, 2.94.3

The advisory says unsupported Nix branches 2.29, 2.32 and 2.33 should be presumed vulnerable. Lix 2.93 and older are affected but no longer maintained. Updates are in progress for the NixOS unstable and 26.05 channels.

The Guix package manager is not affected.

A timeline months in the making

The Lix team's write-up shows how long coordination took. The overflow bug was disclosed to the team on July 29, and fixes were ready on August 29. The macOS privilege escalation chain arrived on September 12, and the sandbox escape on October 9.

The Lix post stresses that its daemon is not a security boundary. It advises build farms to run the daemon as an unprivileged user where possible.

Tech AI Wire covered a separate supply-chain concern last month, a tampered strip binary that could backdoor NixOS.

What this means for developers

  • Upgrade every multi-user install. Any machine where more than one person or service talks to the Nix daemon is exposed. Single-user setups face less risk, but should still update.
  • Use the right Lix upgrade path. The advisory warns that plain nix upgrade-nix can uninstall Lix 2.95.x before installing the new version. Use the Lix 2.95.4 upgrade script instead.
  • Check store ownership after scripted installs. If Nix was installed with the multi-user script, the advisory gives commands to make every store path owned by root again.
  • Audit allowed-users. Until you upgrade, everyone on that list can effectively become root. Trim it to the accounts that need to build.
  • Treat untrusted Nix code as untrusted. CI systems that evaluate pull requests from strangers could hit the overflow bug. Run those evaluations in isolated machines.

Sources

  1. Security advisory for Nix and Lix - October 2026 - NixOS Discourse
  2. 3 security issues in Lix - Lix
  3. nix-daemon: Unprivileged clients can corrupt store paths via repair flag in AddToStoreNar/AddMultipleToStore - GitHub (NixOS/nix)
  4. Nix and Lix local root-privilege-escalation vulnerabilities - LWN.net

Related articles

The weekly digest

One email every Friday with the week's top stories from all six desks: AI, dev tools, coding, the tech industry, startups and what's next. Free, no spam.

Unsubscribe anytime with one click.