Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2025-59378 Overview
CVE-2025-59378 is a local privilege escalation vulnerability in guix-daemon, a core component of GNU Guix. The flaw allows a regular user to write a content-addressed-mirrors file that creates a setuid program during a build. The resulting setuid binary persists after the build completes and lets an unprivileged user assume the identity of the build user that executed it. The issue is tracked as [CWE-669: Incorrect Resource Transfer Between Spheres]. The vulnerability affects GNU Guix versions prior to commit 1618ca7.
Critical Impact
A local unprivileged user can gain the privileges of the Guix build user, enabling lateral access to resources owned by that account and expanding the local attack surface.
Affected Products
- GNU Guix guix-daemon versions before commit 1618ca7aa2ee8b6519ee9fd0b965e15eca2bfe45
- Systems using Guix build infrastructure with shared build users
- Guix System deployments where unprivileged users can trigger builds
Discovery Timeline
- 2025-09-15 - CVE-2025-59378 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-59378
Vulnerability Analysis
The vulnerability resides in how guix-daemon handles the content-addressed-mirrors file during package builds. GNU Guix uses dedicated build users to isolate derivations from the rest of the system. A crafted build can write a content-addressed-mirrors file that materializes a program with the setuid bit set and ownership assigned to the build user. Because the setuid attribute is preserved on the resulting file, the binary continues to grant the build user's privileges to any process that executes it, long after the build itself has terminated. The flaw is classified under [CWE-669: Incorrect Resource Transfer Between Spheres], reflecting the inappropriate crossing of a privilege boundary from the sandboxed build environment to the host user space.
Root Cause
The root cause is insufficient restriction on file attributes retained by build outputs. guix-daemon did not strip or sanitize the setuid bit on files produced through the content-addressed-mirrors mechanism. Build users exist to isolate derivations, but a persistent setuid binary owned by one of them undermines that isolation model.
Attack Vector
Exploitation requires local access and the ability to invoke guix-daemon builds. An attacker constructs a derivation that writes a content-addressed-mirrors file producing a setuid helper. After the build completes, the attacker executes the setuid binary and inherits the build user's effective UID. From that position, the attacker can tamper with store files owned by that build user and interfere with other derivations. Technical remediation details are available in the GNU Guix security advisory and the upstream fix commit.
Detection Methods for CVE-2025-59378
Indicators of Compromise
- Unexpected setuid files under /gnu/store owned by a guix-builder account
- Processes executing from /gnu/store paths running with elevated effective UID
- Build outputs containing content-addressed-mirrors references that produce executable files with mode bits including 04000
Detection Strategies
- Audit the Guix store for files with setuid or setgid bits using find /gnu/store -perm /6000 -type f
- Review guix-daemon build logs for derivations that write to content-addressed-mirrors
- Correlate process execution telemetry with store paths and effective UID transitions to identify misuse of build-user privileges
Monitoring Recommendations
- Enable Linux audit rules for setuid and setgid syscalls on store paths
- Monitor execve events where the executable resides in /gnu/store and the effective UID matches a Guix build account
- Alert on new setuid binaries created outside of expected system package operations
How to Mitigate CVE-2025-59378
Immediate Actions Required
- Update guix-daemon to a build that includes commit 1618ca7 or later
- Restart the guix-daemon service after upgrading to ensure the patched binary is active
- Scan the store for existing setuid files created by builds and remove or neutralize any that are not expected
Patch Information
The upstream fix is available in GNU Guix commit 1618ca7aa2ee8b6519ee9fd0b965e15eca2bfe45. Administrators should run guix pull and guix system reconfigure on Guix System, or update the package providing guix-daemon on foreign distributions. See the GNU Guix advisory for operator guidance.
Workarounds
- Restrict access to guix-daemon so that only trusted local users can submit derivations
- Periodically sweep /gnu/store for setuid binaries and clear mode bits that are not required
- Run guix-daemon build users under additional sandboxing to limit the value of impersonating them
# Identify setuid or setgid files in the Guix store
sudo find /gnu/store -xdev -type f -perm /6000 -printf '%M %u %p\n'
# After upgrading, verify guix-daemon version includes the fix
guix --version
sudo systemctl restart guix-daemon
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

