Critical vulnerabilities in Sudo allow local users to gain root access on Linux, affecting many major distributions

Two recently discovered vulnerabilities in the Sudo command call into question the security of many major Linux distributions. Easily exploitable by unprivileged local users, these flaws provide near-instant root access, opening the door to severe compromises of affected systems. These vulnerabilities highlight the critical importance of rapid updates and robust protection for all Linux environments, whether on servers or workstations. With Linux everywhere, from enterprise servers to embedded systems, the Sudo command plays a fundamental role. It allows limited users to execute certain commands with root privileges, justifying what is known as the principle of least privilege. But when the security of this tool is compromised, the risk becomes critical. Two vulnerabilities, listed as CVE-2025-32462 and CVE-2025-32463, expose local privilege escalation flaws. These vulnerabilities are all the more alarming because they affect a widely used version of Sudo, from 1.8.8 to 1.9.17, meaning that a large majority of distributions, from Ubuntu to Red Hat, including Debian, SUSE, and Amazon Linux, must apply the patches available since the release of version 1.9.17p1. Let’s explore in detail how these vulnerabilities work, their consequences, and best practices for protecting against them. Technical Analysis of Critical Sudo Vulnerabilities Affecting Root Access The first vulnerability highlighted, CVE-2025-32462, is based on a flaw in the handling of the -h option. (host) option. This option, introduced in 2013, allows you to specify the hostname under which sudo privileges are authorized. Specifically, it allows certain users to execute commands on specific machines only. However, the bug, which went unnoticed for over 12 years, now allows a local user to execute commands on their local machine that are only authorized on remote machines referenced in the sudoers file. This flaw is particularly critical in environments where a common sudoers file is distributed across multiple machines, a common practice in large infrastructures using LDAP or SSSD for centralized sudo privilege management. A malicious user can exploit this weakness to bypass restrictions and perform administrative actions on their own machine without the necessary privileges, by impersonating another machine. Origin: Mishandling of the -h (host) option in sudoers Duration: Existed since September 2013 Impact: Execution of authorized commands for a remote host on the local machine

Affected environments: Distributed sudoers file systems, LDAP, SSSD CVSS Score: 2.8 (Low to Moderate, but relevant exploit in a specific context)In parallel, the second vulnerability,

CVE-2025-32463

, has a much higher severity with a CVSS score of 9.3. It exploits Sudo’s chroot feature, which allows a command to be executed with a modified root directory (–chroot or -R option), useful in certain isolation scenarios. However, this security mechanism is at the heart of the problem.

In this vulnerability, an unprivileged local user can create a fake /etc/nsswitch.conf file in a directory under its control, intended to become the new root via chroot. Sudo will eventually read this file in this context and be able to load a malicious shared library or execute arbitrary commands with root privileges. This attack does not require any entry in the sudoers file, making it a universal threat on all vulnerable installations with the chroot feature enabled.Origin: sudo loading of configuration files under the user's chroot Impact:

Direct and complete escalation of root privileges for any local user

  • Requirement for sudoers: No rules required
  • Scopes: Systems using sudo with the chroot option
  • Outlook: The Sudo project is considering the complete removal of the chroot option in the future
  • The combination of these two vulnerabilities raises major concerns about the robustness of permissions management in Linux systems, especially in the context of the growing adoption of cloud and virtualized solutions, where sudo configurations are more complex and centralized. Discover vulnerabilities related to sudo and root access. Learn how these vulnerabilities can compromise your system’s security and what steps to take to effectively mitigate them.
  • Impact on Major Linux Distributions and Implications for System Security The findings about Sudo are broad because the command is installed by default on virtually all Linux distributions. From consumer systems like Ubuntu, Fedora, and Debian, to enterprise-oriented distributions like Red Hat Enterprise Linux, SUSE Linux Enterprise, and even cloud-based variants like Amazon Linux and Alpine, all are potentially affected if they don’t have the proper update.

This ubiquity of Sudo in the Linux landscape means that the mere presence of vulnerabilities requires rapid response. Systems teams must systematically check the installed version of Sudo, identify whether the machine uses centralized sudoers files or the chroot function, and apply patches quickly. Major vendors have already published security advisories and deployed updates to their official repositories:AlmaLinux 8 and 9Alpine Linux Amazon Linux DebianGentoo

Oracle Linux Red Hat SUSE Linux Enterprise

  • Ubuntu These patches extend to version 1.9.17p1 of Sudo, which contains specific patches for the two critical flaws. Failure to update will leave systems vulnerable to simple exploits by local malicious users, sometimes even without privileges. For administration teams, this requires regular auditing of sudo configurations using commands such as sudo -l to list permissions, while integrating this approach into a comprehensive security management (hardening) and vulnerability monitoring program. For example, mastering essential Sudo commands is an essential skill.
  • Furthermore, this alert reaffirms the importance of following news related to the Linux kernel and distributions, particularly with the regular release of new versions incorporating critical updates, such as Ubuntu 25.10, which includes Linux 6.17, optimized for security and stability. Accessible here: Ubuntu 25.10 and Linux Kernel 6.17. Essential procedures for patching Sudo vulnerabilities and ensuring protection
  • Applying security updates remains the first essential step. All Linux administrators should ensure that the version of Sudo being used is at least 1.9.17p1, which contains the patch released at the end of April. This patch notably corrects incorrect handling of the host option and disables the chroot functionality, which was deemed problematic. Here’s a typical approach for updating on most distributions: Identify the current sudo version:
  • sudo –version Update system packages:
  • sudo apt update && sudo apt upgrade sudo (Debian/Ubuntu)

or

sudo dnf update sudo

(Fedora/Red Hat)

Check for the new version: sudo –versionshould display v1.9.17p1 or higher

Test sudoers functionality and avoid using the chroot option

Restart associated services if necessary

  • For organizations using sudoers files distributed via LDAP or SSSD, the patch effectively eliminates the ability to execute commands originally intended for another host. This should be verified as this scenario is a classic exploitation case for the first vulnerability. In addition to updating, here are some best practices to limit risks, even in the event of an attack:
  • Strictly limit users in the sudo group
  • Monitor sudo logs and activities in real time
  • Avoid complex sudoer configurations based on the chroot functionality
  • Prioritize regular updates of all system packages
  • Train users on password security and digital hygiene (see Linux password reset method)
  • Vigilance remains essential, as even an up-to-date system can be compromised by improper sudoer configuration or poorly managed permissions on Linux machines.
  • Discover sudo-related vulnerabilities and their impact on root access. Learn about security risks and best practices to protect your system from potential exploits.
  • Practical cases of Sudo vulnerabilities and feedback

The simplicity of exploiting vulnerabilities in Sudo has been demonstrated by several researchers, including Rich Mirch of Stratascale. In a typical context, a local, unprivileged user can gain near-full root access with just a few commands: For CVE-2025-32462, a user overcomes the assumption that sudoers are distributed across multiple hosts. By calling sudo with the host option and exploiting the bug, they can execute commands that should be restricted to a remote host on the local machine. For CVE-2025-32463, a user creates a fake root folder containing a modified /etc/nsswitch.conf file. They then call sudo with the chroot option to load this file and hijack the shared library, thus gaining root access. These examples show that even without sudo permissions declared in the sudoers file, an unpatched system is vulnerable. The attack is accessible to anyone with knowledge of these details, which have been public knowledge since April 2025. The main risk concerns machines that are physically accessible or remotely connected but already logged in to the local user.

Brands and companies operating Linux infrastructures must take this vulnerability seriously. A complete audit of the sudo configuration, as well as a verification of deployed versions, remains imperative. Furthermore, additional measures, such as configuring intrusion detection systems (IDS) and analyzing logs, reduce the risk of exploitation in real time. Evolution of Sudo Security and Recommendations for Linux Users Faced with the recurring issue of vulnerabilities in Sudo, the project behind this tool has already announced the upcoming removal of the chroot function in an upcoming release. This decision aims to simplify the source code and limit possible attack vectors by eliminating an option deemed too risky and error-prone. For Linux administrators and enthusiasts, this development underscores the importance of a proactive and rigorous approach to managing system privileges. Beyond one-off fixes, securing the system requires: A thorough understanding of sudo mechanisms, its configuration files, and commands (mastering the Sudo and Su commands)

Regular monitoring of distribution updates and their security packages Adopting best practices around the sudoers system, particularly by avoiding excessive privilege assignmentIntegration of user privilege monitoring and auditing tools

Raising general user awareness of Linux security, including password and access management

For those wishing to deepen their system knowledge or optimize their local network, practical resources are available, such as configuring the Bind9 DNS server on a local network

or implementing bonding on Ubuntu for greater network robustness.

  1. In the open source software movement, each vulnerability publication highlights how vibrant and responsive the Linux community is. But it also reminds us that security is, above all, a matter of constant attention and good reflexes, an essential component of any effective and responsible administration.
    Discover how sudo-related vulnerabilities can compromise root access to your system. Learn best practices to secure your environment and protect your data from potential threats.