What are the latest Sudo vulnerabilities (CVE-2025-32462 and CVE-2025-32463), and how do they let local users gain root access on Linux?

Two critical vulnerabilities in the Sudo command-line utility—CVE-2025-32462 and CVE-2025-32463—allow local users on Linux and Unix-like systems to escalate privileges to root. One flaw misuses host-based rules in shared sudoers files, while the other exploits the --chroot option to load malicious config files, even bypassing defined sudo rules. The second bug is particularly dangerous with a CVSS score of 9.3, affecting default configurations. These flaws impact major Linux distributions like Ubuntu, Red Hat, and Debian. Users are urged to update Sudo to version 1.9.17p1 immediately and audit their sudoers configurations for potential risks.

Jul 05, 2025 - 15:13
106.8k
What are the latest Sudo vulnerabilities (CVE-2025-32462 and CVE-2025-32463), and how do they let local users gain root access on Linux?

Sudo, a powerful tool for privilege management on Linux and Unix systems, has been found to contain two serious vulnerabilities that can allow local users to gain unauthorized root access. These flaws, discovered by cybersecurity researcher Rich Mirch and disclosed on July 4, 2025, could affect thousands of systems if left unpatched.

Both vulnerabilities are present in Sudo versions before 1.9.17p1, which is used widely in major Linux distributions like Ubuntu, Red Hat, Debian, and AlmaLinux.

Let’s break down what these flaws are, how they work, and how you can protect your systems.

What is Sudo and Why Is It Important?

Sudo stands for “Superuser Do”, and it allows regular users to execute administrative tasks as another user — usually root. It helps enforce the principle of least privilege in Linux systems.

Sudo’s behavior is controlled by the file /etc/sudoers, which defines:

  • Which users can run what commands

  • As which other users (like root)

  • On which machines

  • With or without password prompts

The Two Critical Sudo Vulnerabilities

CVE ID CVSS Score Severity Summary
CVE-2025-32462 2.8 Low Misuse of -h host option lets users run remote sudo commands locally
CVE-2025-32463 9.3 Critical Misuse of --chroot loads malicious config and grants root access

Let’s examine each vulnerability in more detail.

 CVE-2025-32462 – Host Misconfiguration Vulnerability

  • What It Does: Allows users to run commands intended for a different host on the current local machine.

  • Root Cause: A bug in the -h (host) flag behavior, present since 2013.

  • Who Is Affected: Environments using a shared sudoers file across multiple machines, especially those using LDAP-based sudoers like SSSD.

  • Risk Level: Moderate; requires specific configuration.

“This vulnerability has gone unnoticed for more than 12 years,” says Rich Mirch. “It allows misrouted permissions when host rules aren’t properly enforced.”

 CVE-2025-32463 – chroot Misuse Leads to Root Privilege Escalation

  • What It Does: Allows any local user to gain root privileges, even without being defined in the sudoers file.

  • How It Works: Exploits the --chroot (-R) option by crafting a fake /etc/nsswitch.conf inside a user-controlled directory. This tricks Sudo into loading a malicious shared library.

  • Risk Level: High (CVSS 9.3)

  • Impact: Default configurations are vulnerable, no sudoer rule is required.

“It’s a serious misbehavior of the chroot feature. Even default sudo setups can be exploited,” warns Mirch.

 How to Fix the Vulnerabilities

The good news? Patches are already available.

  • Sudo Version 1.9.17p1 fixes both issues.

  • Distributions Issuing Advisories:

    • CVE-2025-32462: AlmaLinux 8 & 9, Alpine Linux, Amazon Linux, Debian, Gentoo, Oracle Linux, Red Hat, SUSE, Ubuntu

    • CVE-2025-32463: Alpine Linux, Amazon Linux, Debian, Gentoo, Red Hat, SUSE, Ubuntu

 Recommended Actions

Action Description
 Update Sudo Install version 1.9.17p1 or later immediately
 Audit Sudoers Configurations Check for -h (host-based) rules or shared files
 Avoid chroot Usage Especially in untrusted environments or scripts
 Apply Principle of Least Privilege Reassess who has sudo access and why
 Document Incidents If you suspect compromise, check sudo logs and processes

 Sudo’s Future: chroot Option to Be Removed

The chroot functionality is now considered too risky. Sudo maintainer Todd C. Miller announced that the option will be completely removed in a future release:

“Supporting a user-specified root directory is error-prone and opens up critical risks.”

 Why These Flaws Matter for Cybersecurity

Sudo is installed by default on almost all Linux systems — desktops, servers, and even IoT devices. That makes it a prime target for attackers looking to escalate privileges once inside a machine.

These vulnerabilities show:

  • Even mature, trusted tools like Sudo can hide critical bugs.

  • A single misconfiguration or overlooked patch can lead to full system compromise.

  • Default installations are not always safe — configuration matters.

At a Glance

Feature CVE-2025-32462 CVE-2025-32463
Type Host config bypass chroot privilege escalation
CVSS Score 2.8 9.3
Risk Level Medium Critical
Affected Versions Sudo < 1.9.17p1 Sudo < 1.9.17p1
Patch Available ✅ Yes ✅ Yes
Impacted Distros Most major Linux Most major Linux
Requires Sudoer Entry Yes No

Conclusion

These vulnerabilities are a clear reminder that local privilege escalation still poses major threats — especially when tools like Sudo are misconfigured or outdated.

If you’re a system administrator, developer, or cybersecurity analyst, take action now:

  • Patch Sudo immediately

  • Review your sudoers setup

  • Avoid using risky features like chroot

Small oversights can have big consequences, and in a world where attackers constantly probe for weak spots, proactive patching is your best defense.

FAQs

It’s a vulnerability that lets users run commands intended for another host on the local system due to host misconfigurations in shared sudoers files.

This flaw allows local users to gain root access by abusing the --chroot option and loading malicious config files from user-controlled directories.

CVE-2025-32463 has a CVSS score of 9.3, marking it as a critical severity vulnerability.

By exploiting how Sudo loads /etc/nsswitch.conf, attackers can inject malicious libraries and execute code with root privileges.

All versions before 1.9.17p1 are affected by both CVE-2025-32462 and CVE-2025-32463.

Yes, Sudo version 1.9.17p1 addresses both vulnerabilities and is available for download.

Ubuntu, Red Hat, Debian, SUSE, Alpine Linux, AlmaLinux, Amazon Linux, Oracle Linux, and more.

No, these are local privilege escalation vulnerabilities, meaning the attacker needs local access.

Not for CVE-2025-32463. Even users not listed in the sudoers file can exploit this flaw using chroot.

It has existed for over 12 years, since the host feature was introduced in 2013.

It allows commands to run in a different root directory. This feature is now considered insecure and will be removed.

Yes. Developers have confirmed the --chroot option will be removed due to its risks.

Run sudo -V in the terminal to see your installed version.

Use sudo apt update && sudo apt install sudo to get the latest patched version.

It defines how Linux resolves hostnames, users, and groups — attackers misuse it in this exploit.

It affects default Sudo setups and allows unprivileged users to get full root access.

The vulnerabilities were found by Rich Mirch, a researcher at Stratascale.

Yes, as long as you are using version 1.9.17p1 or later with updated configs.

Patch all internet-facing and multi-user Linux systems, including production servers and DevOps machines.

Yes, with root access, attackers can install persistent malware or create backdoors.

It’s the /etc/sudoers config file that defines who can run what commands on which machines.

Yes, shared LDAP sudoers configurations are also vulnerable to CVE-2025-32462.

No, both vulnerabilities are related to local privilege escalation only.

Check your sudo version and whether you use -h or --chroot features.

Look at /var/log/auth.log and sudo command histories to detect unusual activity.

Only if they are configured to monitor for chroot misuse or sudo privilege escalation.

Limit sudoers file permissions, disable chroot, and monitor sudo logs closely.

Yes, the chroot option will be removed to prevent further misuse.

If they use vulnerable sudo versions inside containers, then yes.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.