CVE-2021-3156
Sudo Heap-Based Buffer Overflow Vulnerability
- High 7.8
- Exploited: added to CISA KEV 6 Apr 2022
Description
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.
Key facts
- Published
- 26 Jan 2021
- Last changed
- 21 Oct 2025
- Assigned by
- mitre
- KEV added
- 6 Apr 2022
- KEV fix due
- 27 Apr 2022
- EPSS
- 99.962% likely to be exploited in the next 30 days, higher than 99.976% of CVEs (scores for 15 Nov 2026)
- SSVC (CISA)
- Exploitation: active; Automatable: no; Technical impact: total
Severity scores
Each score is shown as its source gave it. They are not averaged or merged.
- 7.8CVSS 3.1, Highfrom CISA (ADP container)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
What to do
- Apply updates per vendor instructions.CISA KEV required action
Historical context and remediation
This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.
No separately sourced impact summary is available on this page yet. Consult the description, version data and dated exploitation evidence.
Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a |
|
Timeline
- 26 Jan 2021 Published
- 6 Apr 2022 CVE-2021-3156 added to CISA KEV
- 6 Apr 2022 Added to the CISA KEV catalogue
Weakness
References
- [debian-lts-announce] 20210126 [SECURITY] [DLA 2534-1] sudo security update
- 20210126 Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)
- [oss-security] 20210126 Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)
- GLSA-202101-33
- DSA-4839
- FEDORA-2021-2cb63d912a
- FEDORA-2021-8840cbdccd
- [oss-security] 20210127 Re: Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)
- [oss-security] 20210127 Re: Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)
- 20210129 Sudo Privilege Escalation Vulnerability Affecting Cisco Products: January 2021
- VU#794544
- 20210211 APPLE-SA-2021-02-09-1 macOS Big Sur 11.2.1, macOS Catalina 10.15.7 Supplemental Update, and macOS Mojave 10.14.6 Security Update 2021-002
- [oss-security] 20210215 Re: sudo: Ineffective NO_ROOT_MAILER and Baron Samedit
- www.oracle.com
- www.sudo.ws
- www.openwall.com
- packetstormsecurity.com
- security.netapp.com
- security.netapp.com
- packetstormsecurity.com
- packetstormsecurity.com
- packetstormsecurity.com
- support.apple.com
- kc.mcafee.com
- www.beyondtrust.com
- www.synology.com
- [oss-security] 20210914 Re: Oracle Solaris membership in the distros list
- www.oracle.com
- www.oracle.com
- [oss-security] 20240130 Re: CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog()
- [oss-security] 20240130 CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog()
- packetstormsecurity.com
- 20240204 CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog()
- www.vicarius.io