Sudo 权限提升漏洞

漏洞信息

漏洞名称: Sudo 权限提升漏洞

漏洞编号:

  • CVE: CVE-2025-32462, CVE-2025-32463

漏洞类型: 权限提升

漏洞等级: 高危

漏洞描述: Sudo是一个在类Unix操作系统中广泛使用的程序,允许用户以其他用户的安全权限运行程序,通常是超级用户。它被设计为让系统管理员能够赋予用户有限的root权限,而不需要分享root密码。Sudo在多种Linux发行版中默认安装,是企业级服务器和个人计算机中常见的安全工具。

CVE-2025-32462和CVE-2025-32463是两个在Sudo中发现的安全漏洞。CVE-2025-32462(CVSS评分:2.8)涉及当sudoers文件指定了一个既不是当前主机也不是ALL的主机时,允许列出的用户在非预期的机器上执行命令。CVE-2025-32463(CVSS评分:9.3)更为严重,允许本地用户通过利用–chroot选项使用用户控制目录中的/etc/nsswitch.conf文件来获取root访问权限。这两个漏洞的技术根源在于Sudo在处理特定配置文件和选项时的输入验证不足和访问控制缺失。

这些漏洞的影响非常严重,尤其是CVE-2025-32463,它允许本地用户在不需要任何认证的情况下提升权限至root,可能导致系统完全被控制。攻击者可以利用这些漏洞执行任意命令,访问敏感数据,甚至破坏系统服务。由于Sudo的广泛使用,这些漏洞对多种Linux发行版构成了重大威胁。建议用户立即更新至Sudo 1.9.17p1或更高版本以缓解这些漏洞。

产品厂商: Sudo Project

产品名称: Sudo

影响版本: version < 1.9.17p1

来源: https://github.com/toohau/CVE-2025-32462-32463-Detection-Script-

类型: CVE-2025:github search

仓库文件

  • README.md
  • check_cve_2025_32462.sh
  • check_cve_2025_32463.sh

来源概述

CVE-2025-32462-32463-Detection-Script-

Critical Sudo Vulnerabilities Let Local Users Gain Root Access on Linux, Impacting Major Distros

A brief description of the vulnerabilities is below -

CVE-2025-32462 (CVSS score: 2.8) - Sudo before 1.9.17p1, when used with a sudoers file that specifies a host that is neither the current host nor ALL, allows listed users to execute commands on unintended machines
CVE-2025-32463 (CVSS score: 9.3) - Sudo before 1.9.17p1 allows local users to obtain root access because "/etc/nsswitch.conf" from a user-controlled directory is used with the --chroot option

Instructions to Use the Script

Save the Script: Copy the script above into a file named check_cve_2025_32462.sh.

Make the Script Executable: Run the following command to make the script executable:

bash

chmod +x check_cve_2025_32462.sh

Run the Script: Execute the script with:

bash

./check_cve_2025_32462.sh

Notes

This script checks the installed version of sudo and compares it against known vulnerable versions. It also checks for the misuse of the -h option.
Ensure you have the necessary permissions to run sudo commands.
If a vulnerable version is detected, it is recommended to update sudo to version 1.9.17p1 or later to mitigate the vulnerability.

Additional Recommendations

Regularly review and update your system packages.
Monitor your sudoers file for any unusual configurations that may exploit this vulnerability.

Sudo 权限提升漏洞
http://example.com/2025/07/11/github_3696767015/
作者
lianccc
发布于
2025年7月11日
许可协议