CVE-2025-32462

Description

A privilege escalation vulnerability was found in Sudo. In certain configurations, unauthorized users can gain elevated system privileges via the Sudo host option (-h or --host). When using the default sudo security policy plugin (sudoers), the host option is intended to be used in conjunction with the list option (-l or --list) to determine what permissions a user has on a different system. However, this restriction can be bypassed, allowing a user to elevate their privileges on one system to the privileges they may have on a different system, effectively ignoring the host identifier in any sudoers rules. This vulnerability is particularly impactful for systems that share a single sudoers configuration file across multiple computers or use network-based user directories, such as LDAP, to provide sudoers rules on a system.

Statement

This vulnerability is classified as a Local Privilege Escalation (LPE), meaning an attacker needs an authenticated account before they could exploit it. Due to this restriction, the severity is rated Important. Additionally, for a system to be vulnerable, it must already be in a non-default configuration.

The system’s sudoers file must contain rules that define that user’s privileges on a different system. There are multiple mechanisms a system administrator could use to distribute sudoers rules, such as LDAP, Ansible playbooks, or via inclusion in a “Golden Image,” and therefore may be affected by this vulnerability. In environments using LDAP to manage sudoers files, look for sudoRoles objects that use sudoHost values to manage different levels of user privliges across multiple systems.

In situations where host A’s sudoers rules include permissions defined for another host B, a user on host A could use the privileges granted to them on host B while logged into host A. For example, a sudoers file on hostA and hostB might include the following rules:

Alice	hostA = ALL
Bob	hostB = ALL

If Bob logs into hostA and runs sudo some command, Sudo will check that Bob has permission to run some command on hostA. Since Bob does NOT have that privilege on hostA, Sudo will deny the requested command.

However, the local Sudo rules on hostA can be bypassed if Bob logs into hostA and runs sudo -h hostB some command. In this case, Sudo will verify that Bob has permission to run some command on hostB. Since Bob does have that privilege, Sudo will run the requested command on hostA, where Bob is currently logged in.

Mitigation

For environments using sudoers files: Remove rules defined in sudoers files that are for any system other than the local system.

For environments using LDAP: Use a narrow-scoped search path in the SSSD configuration so rules that don’t apply to a system are not included in the LDAP query results.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score78.82.8
Attack VectorLocalLocalLocal
Attack ComplexityHighLowHigh
Privileges RequiredLowLowLow
User InteractionNoneNoneNone
ScopeUnchangedChangedChanged
ConfidentialityHighHighNone
Integrity ImpactHighHighLow
Availability ImpactHighHighNone

Vector

Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

cve.org: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:L/A:N

Understanding the Weakness (CWE)

Confidentiality

Technical Impact: Read Application Data; Read Files or Directories

An attacker could bypass intended access restrictions to read sensitive data, either by reading the data directly from a data store that is not correctly restricted, or by accessing insufficiently-protected, privileged functionality to read the data.

Integrity

Technical Impact: Modify Application Data; Modify Files or Directories

An attacker could bypass intended access restrictions to modify sensitive data, either by writing the data directly to a data store that is not correctly restricted, or by accessing insufficiently-protected, privileged functionality to write the data.

Access Control

Technical Impact: Gain Privileges or Assume Identity; Bypass Protection Mechanism

An attacker could bypass intended access restrictions to gain privileges by modifying or reading critical data directly, or by accessing privileged functionality.

Confidentiality,Integrity,Availability

Technical Impact: Execute Unauthorized Code or Commands

An attacker could use elevated privileges to execute unauthorized commands or code.

Availability

Technical Impact: DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory); DoS: Resource Consumption (Other)

An attacker could gain unauthorized access to resources on the system and excessively consume those resources, leading to a denial of service.

Frequently Asked Questions

Want to get errata notifications? Sign up here.