sudo -h Privilege Escalation Vulnerability
漏洞信息
漏洞名称: sudo -h Privilege Escalation Vulnerability
漏洞编号:
- CVE: CVE-2025-32462
漏洞类型: 权限提升
漏洞等级: 高危
漏洞描述: 该漏洞(CVE-2025-32462)影响sudo(一个广泛使用的Unix和Linux系统中的程序,允许用户以其他用户的权限运行程序,通常用于提升权限执行管理任务)的所有版本≤1.9.17。漏洞的根源在于sudo的-h
选项的逻辑缺陷,当sudoers配置文件存在如(ALL, !root) NOPASSWD: ALL
等错误配置时,攻击者可以利用此漏洞绕过RunAs限制,执行未授权的root命令。这种漏洞的存在使得攻击者可以在不需要密码的情况下,通过特定的命令序列获得root权限,从而完全控制系统。由于sudo在Unix和Linux系统中的广泛使用,此漏洞的影响范围非常广泛,尤其是在那些配置不当的系统上。攻击者可以利用此漏洞进行本地权限提升,无需复杂的交互即可实现自动化攻击,对系统安全构成严重威胁。
产品厂商: sudo
产品名称: sudo
影响版本: version <= 1.9.17
来源: https://github.com/cyberpoul/CVE-2025-32462-POC
类型: CVE-2025:github search
仓库文件
- CVE-2025-32462.sh
- LICENSE
- README.md
来源概述
CVE-2025-32462 – sudo -h Privilege Escalation PoC
🚨 Local privilege escalation exploit for
sudo
via the-h/--host
argument
Affects systems withsudo
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.17sudoers
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 viasudo -h
.
➡️ To exit the root shell, type:exit
📚 References
*
*