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
| # | CVE | CVSS | Published | Type | CISA KEV |
|---|---|---|---|---|---|
| 1 | CVE-2025-32463 | 7.8 High | 2025-06-30 | Sudo Inclusion of Functionality from Untrusted Control Sphere | Yes |
| 2 | CVE-2021-3156 | 7.8 High | 2021-01-26 | Sudo Heap-Based Buffer Overflow | Yes |
| 3 | CVE-2025-32462 | 8.8 High | 2025-06-30 | Incorrect authorization | No |
| 4 | CVE-2023-7090 | 8.8 High | 2023-12-23 | Improper privilege management | No |
| 5 | CVE-2019-14287 | 8.8 High | 2019-10-17 | Security flaw | No |
| 6 | CVE-2005-1831 | 8.4 High | 2005-05-31 | Privilege escalation | No |
| 7 | CVE-2017-1000368 | 8.2 High | 2017-06-05 | Improper input validation | No |
| 8 | CVE-2026-35535 | 7.8 High | 2026-04-03 | Privilege escalation | No |
| 9 | CVE-2023-22809 | 7.8 High | 2023-01-18 | Improper privilege management | No |
| 10 | CVE-2021-23240 | 7.8 High | 2021-01-12 | Link following | No |
Each sudo CVE explained
1. CVE-2025-32463: Sudo Inclusion of Functionality from Untrusted Control Sphere
- 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)
2. CVE-2021-3156: Sudo Heap-Based Buffer Overflow
- 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)
3. CVE-2025-32462: Incorrect authorization
- 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)
4. CVE-2023-7090: Improper privilege management
- 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)
5. CVE-2019-14287: Security flaw
- 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)
6. CVE-2005-1831: Privilege escalation
- 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.
7. CVE-2017-1000368: Improper input validation
- 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).
8. CVE-2026-35535: Privilege escalation
- 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)
9. CVE-2023-22809: Improper privilege management
- 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)
10. CVE-2021-23240: Link following
- 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)
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
- Update through your distribution's package manager and restart services that load the library.
- Do not feed untrusted input to the tool without validation or sandboxing.
- Track where it is embedded in your software, since many applications bundle their own copy.
- 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.
Related security guides
Few stacks run sudo alone. These guides cover the technologies it is most often deployed with.
- glibc vulnerabilities: glibc is the GNU C library that nearly every Linux program depends on.
- Linux Kernel vulnerabilities: The Linux kernel is the core of every Linux distribution.
- GNU Bash vulnerabilities: GNU Bash is the default shell on most Linux systems, known for the Shellshock bug.
- curl vulnerabilities: curl and libcurl transfer data over HTTP and dozens of other protocols, and ship in almost every operating system.
- FFmpeg vulnerabilities: FFmpeg is the open-source framework for processing audio and video.
- Ghostscript vulnerabilities: Ghostscript is an interpreter for PostScript and PDF used by many document pipelines.
- ImageMagick vulnerabilities: ImageMagick is a widely used image processing library and toolkit.
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
- National Vulnerability Database (NVD) (opens in a new tab), CVE records, CVSS scores and CPE counts, checked Nov 3, 2026.
- CISA Known Exploited Vulnerabilities (KEV) catalog (opens in a new tab), checked Nov 3, 2026.
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.