Critical Sudo flaws let local users gain root access on Linux systems, the vulnerabilities affect major Linux distributions.
Cybersecurity researchers disclosed two vulnerabilities in the Sudo command-line utility for Linux and Unix-like operating systems. Local attackers can exploit the vulnerabilities to escalate privileges to root on affected systems.
Sudo (short for “superuser do”) is a command-line utility found in Unix and Linux systems. It lets a permitted user run commands with the security privileges of another user, most commonly the root user (the system’s most powerful administrative account).
Below is the description of the two vulnerabilities:
- 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.
The Stratascale Cyber Research Unit (CRU) team discovered both local privilege vulnerabilities.
CVE-2025-32462 is a critical flaw in the Sudo utility, stemming from the --host
option introduced in version 1.8.8 in 2013. Though originally meant only for listing rules (sudo -l
), it also worked with other commands like sudoedit
. In specific enterprise configurations using Host
or Host_Alias
directives, this oversight lets users run commands with elevated privileges by referencing remote host rules.
“The Stratascale CRU team discovered that since the introduction of the host option in 2013, executing a sudo or sudoedit command with the host option referencing an unrelated remote host rule causes Sudo to treat the rule as valid for the local system. As a result, any command allowed by the remote host rule can be executed on the local machine.” reads the report published by Stratascale.”Even though the production server is explicitly denied for the lowpriv user, root access is achieved by specifying the host option for the development server.”
The issue was addressed with a patch that limits the --host
option to listing only.
“Sudo’s -R (–chroot) option is intended to allow the user to run a command with a user-selected root directory if the sudoers file allows it. A change was made in sudo 1.9.14 to resolve paths via chroot() using the user-specified root adirectory while the sudoers file was still being evaluated. It is possible for an attacker to trick sudo into loading an arbitrary shared library by creating an /etc/nsswitch.conf file under the user-specified root directory.” reads the advisory published by Sudo project maintainers. “The change from sudo 1.9.14 has been reverted in sudo 1.9.17p1 and the chroot feature has been marked as deprecated. It will be removed entirely in a future sudo release. Because of the way sudo resolves commands, supporting a user-specified chroot directory is error-prone and this feature does not appear to be widely used.”
On April 1st, 2025, Rich Mirch from Stratascale Cyber Research Unit (CRU) reported the vulnerability to Sudo maintainer Todd Miller. On June 23, 2025 a patch was sent to operating system distros list. Sudo advisory links confirmed.
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, Sudo)