VulnarioBlogsudo vulnerabilities

sudo Vulnerabilities: The 10 Most Critical sudo Security Bugs (CVEs)

sudo vulnerabilities are security flaws in sudo that attackers can abuse to steal data, take over a server or interrupt a service. sudo lets users run commands with elevated privileges on Unix systems. The National Vulnerability Database (NVD) lists 53 CVEs for sudo, 0 of them rated critical, and 1 was published in the last 12 months. CISA lists 2 of them in its Known Exploited Vulnerabilities (KEV) catalog, which means attackers have used them against real systems.

This guide lists the 10 most critical sudo security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers sudo security basics and a free way to be told about the next sudo CVE as soon as it is published.

Key takeaways

  • 2 CVEs are in CISA's KEV catalog, so attackers have exploited them in the wild.
  • 0 sudo CVEs are rated critical (CVSS v3), and 1 new one was published in the last 12 months.
  • The newest CVE in this guide is CVE-2026-35535, published Apr 3, 2026.
  • You can monitor sudo for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.

How we ranked these sudo CVEs

We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.

Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.

The 10 most critical sudo CVEs at a glance

Most critical sudo vulnerabilities (data from NVD and CISA KEV)
#CVECVSSPublishedTypeCISA KEV
1CVE-2025-324637.8 High2025-06-30Sudo Inclusion of Functionality from Untrusted Control SphereYes
2CVE-2021-31567.8 High2021-01-26Sudo Heap-Based Buffer OverflowYes
3CVE-2025-324628.8 High2025-06-30Incorrect authorizationNo
4CVE-2023-70908.8 High2023-12-23Improper privilege managementNo
5CVE-2019-142878.8 High2019-10-17Security flawNo
6CVE-2005-18318.4 High2005-05-31Privilege escalationNo
7CVE-2017-10003688.2 High2017-06-05Improper input validationNo
8CVE-2026-355357.8 High2026-04-03Privilege escalationNo
9CVE-2023-228097.8 High2023-01-18Improper privilege managementNo
10CVE-2021-232407.8 High2021-01-12Link followingNo

Each sudo CVE explained

1. CVE-2025-32463: Sudo Inclusion of Functionality from Untrusted Control Sphere

  • CVSS 7.8 High
  • In CISA KEV (added 2025-09-29)
  • Published 2025-06-30
  • CWE-829
What NVD says
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.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
1.9.14 to before 1.9.17; 1.9.17
What to do
Upgrade to 1.9.17 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2025-32463 (opens in a new tab)

2. CVE-2021-3156: Sudo Heap-Based Buffer Overflow

  • CVSS 7.8 High
  • In CISA KEV (added 2022-04-06)
  • Published 2021-01-26
  • CWE-193
What NVD says
Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
1.8.2 to before 1.8.32; 1.9.0 to before 1.9.5; 1.9.5
What to do
Upgrade to the fixed release for your branch (1.8.32, 1.9.5) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2021-3156 (opens in a new tab)

3. CVE-2025-32462: Incorrect authorization

  • CVSS 8.8 High
  • Published 2025-06-30
  • CWE-863
What NVD says
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.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 1.9.17; 1.9.17
What to do
Upgrade to 1.9.17 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2025-32462 (opens in a new tab)

4. CVE-2023-7090: Improper privilege management

  • CVSS 8.8 High
  • Published 2023-12-23
  • CWE-269
What NVD says
A flaw was found in sudo in the handling of ipa_hostname, where ipa_hostname from /etc/sssd/sssd.conf was not propagated in sudo. Therefore, it leads to privilege mismanagement vulnerability in applications, where client hosts retain privileges even after retracting them.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 1.8.28
What to do
Upgrade to 1.8.28 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2023-7090 (opens in a new tab)

5. CVE-2019-14287: Security flaw

  • CVSS 8.8 High
  • Published 2019-10-17
  • CWE-755
What NVD says
In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer account can bypass certain policy blacklists and session PAM modules, and can cause incorrect logging, by invoking sudo with a crafted user ID. For example, this allows bypass of !root configuration, and USER= logging, for a "sudo -u \#$((0xffffffff))" command.
How it can be attacked
Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 1.8.28
What to do
Upgrade to 1.8.28 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2019-14287 (opens in a new tab)

6. CVE-2005-1831: Privilege escalation

  • CVSS 8.4 High
  • Published 2005-05-31
What NVD says
Sudo 1.6.8p7 on SuSE Linux 9.3, and possibly other Linux distributions, allows local users to gain privileges by using sudo to call su, then entering a blank password and hitting CTRL-C.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
1.6.8p7
What to do
Apply the vendor's security update for your release and restart the service.

NVD record for CVE-2005-1831 (opens in a new tab)

7. CVE-2017-1000368: Improper input validation

  • CVSS 8.2 High
  • Published 2017-06-05
  • CWE-20
What NVD says
Todd Miller's sudo version 1.8.20p1 and earlier is vulnerable to an input validation (embedded newlines) in the get_process_ttyname() function resulting in information disclosure and command execution.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing high privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
up to and including 1.8.20; 1.8.20
What to do
Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).

NVD record for CVE-2017-1000368 (opens in a new tab)

8. CVE-2026-35535: Privilege escalation

  • CVSS 7.8 High
  • Published 2026-04-03
  • CWE-271
What NVD says
In Sudo through 1.9.17p2 before 3e474c2, a failure of a setuid, setgid, or setgroups call, during a privilege drop before running the mailer, is not a fatal error and can lead to privilege escalation.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 1.9.17; 1.9.17
What to do
Upgrade to 1.9.17 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2026-35535 (opens in a new tab)

9. CVE-2023-22809: Improper privilege management

  • CVSS 7.8 High
  • Published 2023-01-18
  • CWE-269
What NVD says
In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_EDITOR, VISUAL, and EDITOR), allowing a local attacker to append arbitrary entries to the list of files to process. This can lead to privilege escalation. Affected versions are 1.8.0 through 1.9.12.p1.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
1.8.0 to before 1.9.12; 1.9.12
What to do
Upgrade to 1.9.12 or a later release, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2023-22809 (opens in a new tab)

10. CVE-2021-23240: Link following

  • CVSS 7.8 High
  • Published 2021-01-12
  • CWE-59
What NVD says
selinux_edit_copy_tfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges by replacing a temporary file with a symlink to an arbitrary file target. This affects SELinux RBAC support in permissive mode. Machines without SELinux are not vulnerable.
How it can be attacked
Can be exploited locally on the machine with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
Affected versions
before 1.8.32; 1.9.0 to before 1.9.5
What to do
Upgrade to the fixed release for your branch (1.8.32, 1.9.5) or a later one, then restart the service.
Advisory
Vendor advisory or patch (opens in a new tab)

NVD record for CVE-2021-23240 (opens in a new tab)

How to check if your sudo is vulnerable

Find the exact version first, then compare it with the affected and fixed versions in each CVE above.

sudo --version

On Linux, Debian, Ubuntu and RHEL-based distributions often backport security fixes and keep the old version number, so a package that looks old can already be patched. Check your distribution's own security tracker or the package changelog before concluding that a server is exposed.

sudo security checklist

  1. Update through your distribution's package manager and restart services that load the library.
  2. Do not feed untrusted input to the tool without validation or sandboxing.
  3. Track where it is embedded in your software, since many applications bundle their own copy.
  4. Run processing jobs as an unprivileged user with limited resources.

Where you run sudo matters as much as how you patch it. Whether your site lives on a VPS, a dedicated server or shared hosting (opens in a new tab), check who is responsible for updating sudo: on most plans the operating system and applications are yours to patch unless the plan says otherwise.

Your stack is bigger than sudo. A flaw anywhere in the chain can be the way in, so also review our guides to glibc vulnerabilities, Linux Kernel vulnerabilities and GNU Bash vulnerabilities.

How to get alerted about new sudo vulnerabilities

NVD received 1 new sudo CVE in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:

  • Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
  • Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
  • Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.

Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose sudo and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.

  • Free: all technologies, alerts grouped at most every 12 hours.
  • Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.

Few stacks run sudo alone. These guides cover the technologies it is most often deployed with.

Frequently asked questions about sudo vulnerabilities

What are the most critical sudo vulnerabilities?

Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical sudo CVEs include CVE-2025-32463 (CVSS 7.8), CVE-2021-3156 (CVSS 7.8), CVE-2025-32462 (CVSS 8.8). The guide above ranks the 10 most critical with affected versions and fixes.

Have sudo vulnerabilities been exploited in real attacks?

Yes. CISA's Known Exploited Vulnerabilities (KEV) catalog lists 2 sudo CVEs, including CVE-2025-32463, CVE-2021-3156. Treat these as the highest priority to patch.

How many vulnerabilities does sudo have?

As of Nov 3, 2026 the National Vulnerability Database lists 53 CVEs for sudo, with 0 rated critical by CVSS v3. 1 was published in the previous twelve months.

How do I check which sudo version I run?

Run sudo --version on the server and compare the result with the fixed versions in each CVE. On Debian, Ubuntu and RHEL-based systems, fixes are often backported without changing the version number, so also check your distribution's security tracker.

How can I get alerted when a new sudo CVE is published?

Add sudo to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose sudo and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.

Is sudo secure?

sudo is as secure as its patch level. NVD published 1 new sudo CVE in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.

What is CVE-2025-32463?

CVE-2025-32463 is a high sudo vulnerability with a CVSS score of 7.8, published Jun 30, 2025. 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.

Sources

This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.