Описание
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.
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.
Отчет
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:
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.
Меры по смягчению последствий
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.
Затронутые пакеты
Платформа | Пакет | Состояние | Рекомендация | Релиз |
---|---|---|---|---|
Red Hat Enterprise Linux 10 | sudo | Affected | ||
Red Hat Enterprise Linux 6 | sudo | Not affected | ||
Red Hat Enterprise Linux 7 | sudo | Affected | ||
Red Hat OpenShift Container Platform 4 | rhcos | Affected | ||
Red Hat Enterprise Linux 8 | sudo | Fixed | RHSA-2025:10110 | 01.07.2025 |
Red Hat Enterprise Linux 8.2 Advanced Update Support | sudo | Fixed | RHSA-2025:10518 | 07.07.2025 |
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | sudo | Fixed | RHSA-2025:10383 | 07.07.2025 |
Red Hat Enterprise Linux 8.4 Extended Update Support EXTENSION | sudo | Fixed | RHSA-2025:10383 | 07.07.2025 |
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | sudo | Fixed | RHSA-2025:10520 | 07.07.2025 |
Red Hat Enterprise Linux 8.6 Telecommunications Update Service | sudo | Fixed | RHSA-2025:10520 | 07.07.2025 |
Показывать по
Дополнительная информация
Статус:
7 High
CVSS3
Связанные уязвимости
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.
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.
Sudo before 1.9.17p1, when used with a sudoers file that specifies a h ...
7 High
CVSS3