Sudo Privilege Escalation Vulnerabilities (CVE-2025-32463 & CVE-2025-32462)

漏洞信息

漏洞名称: Sudo Privilege Escalation Vulnerabilities (CVE-2025-32463 & CVE-2025-32462)

漏洞编号:

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

漏洞类型: 权限提升

漏洞等级: 严重

漏洞描述: ### 受影响产品
Sudo是几乎所有基于Unix的系统上的核心实用程序,允许用户以另一个用户(通常是root)的身份运行命令。它是Linux上特权访问控制的核心。如果sudo被攻破,影响将是巨大的——任何本地用户都可能获得对整个系统的root级访问权限。

漏洞解释

CVE-2025-32463是一个严重的权限提升漏洞,CVSS评分为9.3,影响sudo版本1.9.17p1之前的所有版本。漏洞的根本原因在于sudoers策略解析逻辑中的不安全路径扩展和缺乏输入清理。攻击者可以通过利用sudoers规则中的通配符(*)在命令路径中的配置不当,通过制作恶意二进制文件并诱使sudo执行它(通过通配符),从而获得root shell。

CVE-2025-32462是一个较低严重性的支持性漏洞,CVSS评分为2.8,影响相同版本的sudo。它不直接启用权限提升,但支持更稳定地利用CVE-2025-32463。

影响分析

这两个漏洞使得攻击者能够在本地提升权限,可能导致系统完全被攻陷。特别是CVE-2025-32463,由于其高严重性和易于利用的特性,使得几乎所有主要的Linux发行版都面临风险。攻击者需要低权限访问才能利用这些漏洞,但一旦成功,可以完全控制系统。因此,建议立即更新sudo到版本1.9.17p1或更高版本,并审计sudoers规则以避免使用通配符条目。

产品厂商: sudo

产品名称: sudo

影响版本: prior to 1.9.17p1

来源: https://github.com/AdityaBhatt3010/Sudo-Privilege-Escalation-Linux-CVE-2025-32463-and-CVE-2025-32462

类型: CVE-2025:github search

仓库文件

  • README.md

来源概述

⚠️ CVE‑2025‑32463 & CVE‑2025‑32462 – Sudo Privilege Escalation Flaws in Linux

🧠 TL;DR

In July 2025, two newly disclosed vulnerabilities in the sudo utility—CVE-2025-32463 and CVE-2025-32462—have put numerous Linux distributions at risk. The more severe of the two, CVE‑2025‑32463, carries a CVSS score of 9.3, enabling local privilege escalation and potential full system compromise. Exploits are now surfacing in the wild. Patch ASAP.


🔍 What Is Sudo?

sudo is a core utility on nearly all Unix-based systems, allowing users to run commands as another user (typically root). It’s central to privileged access control on Linux.

If sudo is compromised, the implications are massive—any local user might gain root-level access to the entire system.


📌 Vulnerability Breakdown

✅ CVE‑2025‑32463 — Critical Privilege Escalation

  • Severity: Critical (CVSS: 9.3)
  • Impact: Local users can bypass security policies and execute arbitrary files with elevated privileges.
  • Affected Sudo Versions: Prior to 1.9.17p1
  • Discovered by: Qualys Threat Research Unit (TRU)
  • Root Cause: An unsafe path expansion and lack of input sanitization in the sudoers policy parsing logic.
🔧 Exploitation

An attacker with low privilege access can exploit a misconfigured sudoers rule that uses wildcards (*) in command paths. By crafting a malicious binary and tricking sudo into executing it (via the wildcard), the attacker achieves root shell.

🔥 In one proof-of-concept (PoC), attackers exploited:

1
Cmnd_Alias EXPLOIT = /usr/bin/cp /etc/* /dev/null

By planting their payload in /etc/passwd, they escalated privileges instantly.


⚠️ CVE‑2025‑32462 — Lower Severity, Supporting Bug

  • Severity: Low (CVSS: 2.8)
  • Impact: Improper cleanup of memory structures. Doesn’t directly enable privilege escalation, but supports more stable exploitation of CVE-2025-32463.
  • Fix: Also resolved in sudo 1.9.17p1

🧬 Affected Distributions

All major distros shipping vulnerable sudo versions are affected:

  • Ubuntu (20.04, 22.04, 24.04)
  • Debian (10/11/12)
  • Fedora
  • Red Hat Enterprise Linux (7, 8, 9)
  • SUSE Linux Enterprise
  • Arch Linux

Each has released emergency patches as of July 15, 2025.


🧪 Detection & Indicators of Exploitation (IoEs)

Look for:

  • Wildcard rules in /etc/sudoers or included policy files.

  • Unknown binaries or scripts in /tmp, /dev/shm, /home/*/.local, etc.

  • Log entries like:

    1
    sudo: unknown user root executed /tmp/payload

🩹 Mitigation

  1. Update Sudo Immediately

    • Version 1.9.17p1 or later fixes both CVEs.

    • Example (Ubuntu):

      1
      sudo apt update && sudo apt install sudo
  2. Audit sudoers Rules

    • Avoid wildcard entries in sudoers:

      1
      2
      # Dangerous
      myuser ALL=(ALL) NOPASSWD: /usr/bin/cp /etc/* /tmp/
      • Replace with explicit command paths.
  3. Use sudo’s secure_path directive

    • Enforces safe, limited $PATH values in elevated environments.
  4. File Integrity Monitoring

    • Tools like AIDE, Auditd, or OSSEC can alert you to suspicious binary drops or script executions.

🔒 Example of Safe sudoers Rule

1
myuser ALL=(ALL) NOPASSWD: /usr/bin/cp /etc/passwd /tmp/passwd.backup

Avoid wildcard (*) and directory-level permissions unless necessary.


🧠 Final Thoughts

This vulnerability is another reminder that “with great power comes great security responsibility.” The flexibility of sudo makes it a powerful tool—and a dangerous one when misconfigured.

Organizations should treat sudo policy hygiene as critical infrastructure, not afterthoughts. Automate audits. Apply least-privilege principles. And, always, patch fast—because attackers already are.


🔗 References



Sudo Privilege Escalation Vulnerabilities (CVE-2025-32463 & CVE-2025-32462)
http://example.com/2025/07/21/github_4047986384/
作者
lianccc
发布于
2025年7月21日
许可协议