CVE-2021-3156
KEVSudo Heap-Based Buffer Overflow Vulnerability
Description
Sudo contains an off-by-one error that can result in a heap-based buffer overflow, which allows for privilege escalation.
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.
CVSS 3.1 vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HPublishedJan 26, 2021
Last modifiedJun 17, 2026
Added to KEVApr 6, 2022
Remediation dueApr 27, 2022
References
- packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.htmlExploitThird Party Advisory
- packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.htmlExploitThird Party Advisory
- packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.htmlExploitThird Party Advisory
- packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.htmlExploitThird Party Advisory
- packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.htmlExploitThird Party Advisory
- seclists.org/fulldisclosure/2021/Feb/42Mailing ListThird Party Advisory
- seclists.org/fulldisclosure/2021/Jan/79ExploitMailing List
- seclists.org/fulldisclosure/2024/Feb/3ExploitMailing List
- openwall.com/lists/oss-security/2021/01/26/3ExploitMailing List
- openwall.com/lists/oss-security/2021/01/27/1Mailing ListThird Party Advisory
- openwall.com/lists/oss-security/2021/01/27/2Mailing ListThird Party Advisory
- openwall.com/lists/oss-security/2021/02/15/1ExploitMailing List
0 recent articles mention this CVE
79
Risk assessment · High
Actively exploited. Patch immediately.
- Exploitation
- Confirmed in the wild (CISA KEV)
- Federal remediation deadline
- Overdue by 1643 days
- CVSS
- 7.8 HIGH
- EPSS (30-day exploit probability)
- 100.0% · top 1% of all CVEs
- Weakness
- CWE-193
Recommended actions
- 1.Apply updates per vendor instructions.
- 2.Treat as emergency change: patch or isolate internet-facing instances first.
- 3.Hunt for compromise: review logs for the disclosure window, not just from the patch date.
Assessment is derived automatically from the live signals above; verify against your own asset inventory.