Share
## https://sploitus.com/exploit?id=C2E224C0-CF56-540C-BF08-2CB968F72D91
# CVE-2025-32462 โ€“ sudo -h Privilege Escalation PoC

![MIT License](https://img.shields.io/badge/license-MIT-green)
![PoC](https://img.shields.io/badge/status-proof--of--concept-blue)
![Visitors](https://visitor-badge.laobi.icu/badge?page_id=cyberpoul.CVE-2025-32462-POC)

> ๐Ÿšจ Local privilege escalation exploit for `sudo` via the `-h/--host` argument  
> Affects systems with `sudo` misconfigurations allowing unintended root access.

---

## ๐Ÿง  About

This PoC demonstrates **CVE-2025-32462**, a logic flaw in `sudo` (all versions โ‰ค 1.9.17),  
where misuse of the `-h` option can bypass RunAs restrictions and allow unintended root command execution.

---

## ๐Ÿ“‹ Requirements

- Affected `sudo` version: **โ‰ค 1.9.17**
- `sudoers` config includes misconfig like:

  `(ALL, !root) NOPASSWD: ALL`


## ๐Ÿš€ Usage

- `chmod +x CVE-2025-32462.sh && ./CVE-2025-32462.sh`

- To test a specific command (example: whoami):
 `./CVE-2025-32462.sh whoami`
If the system is vulnerable and misconfigured, this will drop you into a root shell via `sudo -h`. To exit the root shell, type: `exit`


## ๐Ÿ›ก๏ธ Mitigation

  Upgrade sudo to 1.9.17p1 or later

`(ALL, !root) NOPASSWD: ALL`

๐Ÿšซ Restrict or disable use of the -h / --host option


## ๐Ÿ“š References

- ![NVD Entry]([https://nvd.nist.gov/vuln/detail/CVE-2025-32462)
- ![sudo security page](https://www.sudo.ws/security/advisories)