CVE-2021-3156
Sudo Heap-Based Buffer Overflow Vulnerability
Published Jan 26, 2021 · updated Jun 16, 2026 · sudo project sudo
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.
Timeline
Detection, updates, and resolution for this record.
Jan 26, 2021 · Catalog
Detected
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.
Apr 6, 2022 · CISA KEV
Known exploited
Apply updates per vendor instructions.
Apr 27, 2022 · CISA KEV
Remediation due
Apply updates per vendor instructions.
Jun 16, 2026 · Catalog
Updated
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.
Required action
Apply updates per vendor instructions.
CISA due date Apr 27, 2022
Affected
- cpe debian/debian linux10.0
- cpe debian/debian linux9.0
- cpe fedoraproject/fedora32
- cpe fedoraproject/fedora33
- cpe mcafee/web gateway8.2.17
- cpe netapp/active iq unified managerversion unspecified
- cpe sudo project/sudoversion unspecified
- cpe sudo project/sudo1.9.5
- cpe synology/diskstation manager unified controller3.0
- cpe synology/skynas firmwareversion unspecified
- vendor Sudo Sudoversion unspecified
Sources
- CISA KEVCVE-2021-3156
Sudo contains an off-by-one error that can result in a heap-based buffer overflow, which allows for privilege escalation.
cisa.gov - CVE.orgCVE-2021-3156
Official CVE identifier
cve.org - FIRST EPSSCVE-2021-3156
30-day exploitation probability 100.0%
first.org - Exploit Database49521
Public archive entry. The exploit body is not stored here.
exploit-db.com - Exploit Database49522
Public archive entry. The exploit body is not stored here.
exploit-db.com - Metasploit Modulesexploit_linux/local/sudo_baron_samedit
Public module reference (excellent). Module source is not copied into this catalog.
rapid7.com - NIST NVDCVE-2021-3156
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.
nvd.nist.gov - Packet Storm Securityhttp://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm Securityhttp://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm Securityhttp://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm Securityhttp://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html
Packet Storm link already published on the finding.
packetstormsecurity.com - Packet Storm Securityhttp://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html
Packet Storm link already published on the finding.
packetstormsecurity.com