Actively exploited in the wild
Sudo Heap-Based Buffer Overflow Vulnerability
Sudo - Sudo · Listed in the CISA KEV since 2022-04-06. This indicates confirmed attacks in production environments.
Required action: Apply updates per vendor instructions.
CVE-2021-3156
HighCVSS 7.8KEVSummary
Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow. This allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.
Risk Assessment
A local attacker could exploit this vulnerability to gain root privileges, leading to full system compromise and the ability to perform arbitrary actions.
Recommendation
Update Sudo to version 1.9.5p2 or later. If updating is not possible, consider temporarily restricting sudo access for untrusted users.
Other vulnerabilities in Sudo
See all- CVE-2017-1000368High
Todd Miller's sudo version 1.8.20p1 and earlier is vulnerable to input validation (embedded newlines) in the get_process_ttyname() function resulting in information disclosure and command execution.
- CVE-2016-7032High
Sudo versions before 1.8.15 on Linux contain a vulnerability that may allow local users to bypass noexec command restrictions via applications calling the system or popen functions.
- CVE-2017-2381High
An issue was discovered in certain Apple products, including macOS before 10.12.4, related to the 'sudo' component. It allows remote authenticated users to gain privileges by leveraging membership in the admin group on a network directory server.
- CVE-2015-5602High
A vulnerability in sudoedit before version 1.8.15 allows local users to gain privileges via a symlink attack on a file whose full path is defined using multiple wildcards in /etc/sudoers.
- CVE-2025-32463CriticalActively exploited
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.
- CVE-2026-82474High
Sudo through version 1.9.17p2 fails to apply intercept policy checks to the execveat system call in ptrace-based intercept mode. Users permitted to run specific commands can execute denied programs by calling execveat directly or through fexecve, bypassing policy enforcement and logging.
- CVE-2026-35535High
In Sudo up to version 1.9.17p2 before commit 3e474c2, a failure of setuid, setgid, or setgroups calls during privilege drop before running the mailer is not a fatal error, which can lead to privilege escalation.
- CVE-2025-32462Low
A vulnerability in Sudo before version 1.9.17p1 allows listed users in the sudoers file to execute commands on unintended machines when the file specifies a host that is neither the current host nor ALL.
- CVE-1999-1496Low
Sudo version 1.5 on Debian Linux 2.1 and Red Hat 6.0 allows local users to determine the existence of arbitrary files by attempting to execute the target filename as a program, which generates different error messages when the file does not exist.
- CVE-1999-0958High
Sudo versions 1.5.x allow local users to execute arbitrary commands via a .. (dot dot) attack.
Original NVD description (English source)
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.

