Local root code execution via writable shutdown ramfs
Published Apr 15, 2025 · Updated Apr 15, 2025
Privilege escalation in Nixpkgs for NixOS 22.05 through 24.11 allows local users to execute attacker-controlled programs as root during shutdown. The shutdown-ramfs setup leaves /run/initramfs and copied binaries writable, so systemd pivots into attacker-modified content and executes /shutdown with full privileges. The default-enabled systemd.shutdownRamfs setting and local filesystem access are required; execution occurs when the system powers off, halts, reboots, or kexecs.
Summary
What happened
Privilege escalation in Nixpkgs for NixOS 22.05 through 24.11 allows local users to execute attacker-controlled programs as root during shutdown. The shutdown-ramfs setup leaves /run/initramfs and copied binaries writable, so systemd pivots into attacker-modified content and executes /shutdown with full privileges. The default-enabled systemd.shutdownRamfs setting and local filesystem access are required; execution occurs when the system powers off, halts, reboots, or kexecs.
The record
- CVE
- CVE-2025-32438
- Published
- Apr 15, 2025
- Updated
- Apr 15, 2025
- Vendor
- NixOS
- Product
- Nixpkgs
- Classifications
- CWE-379, CWE-378, T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Apr 15, 2025CVE publishedPublication date reported by the CVE source.
- Apr 15, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< b17590193d8e5697000c23c66afcf11e1753734d
- Affected versionversion=< fbf76bf72b161b9f4ab97704a8258776d5f3ffba
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo