What it is
CVE-2021-3156 is a vulnerability affecting 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...
Vulnerability report
Sudo Privilege Escalation
Sudo Project / Sudo
Decision summary
Direct answers before the deeper technical record.
What it is
CVE-2021-3156 is a vulnerability affecting 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...
Is it exploited?
Yes. KEV Intelligence tracks this CVE as a known exploited vulnerability. Confidence is confirmed.
Who is affected?
Sudo Project / Sudo.
What should we do?
Prioritize remediation. Validate affected assets and apply vendor fixes on an accelerated timeline.
Overview
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.
Exploitation evidence
Third-party attestation and first-party sensor observation are shown separately so teams can judge the evidence chain.
CISA
Independent exploitation attestation added to the KEV Intelligence record.
GitHub
Public scanner or PoC coverage increases practical exploitability.
Per-source evidence links for KEV attestations are available through the KEV Intelligence Pro API.
Learn about Pro API access| Source | Added |
|---|---|
| CISA First | 2022-04-06 00:00 UTC |
Detection
Make the evidence actionable in scanner, SOC, and edge-control workflows.
Raw values available in Pro and Enterprise.
Metasploit template detected 28 Apr 2025.
View Metasploit template (opens in new tab)No KEV Intelligence virtual patch is currently available. Future rules ship for ModSecurity, Cloudflare, and AWS WAF.
Learn about virtual patches →Scanner and exploit-framework references linked to this CVE.
| Scanner | Reference | Detected |
|---|---|---|
| Metasploit | https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/sudo_baron_samedit.rb | 28 Apr 2025 |
Risk and context
CVSS v3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
99.3%
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
AV:L/AC:L/Au:N/C:C/I:C/A:C
These PoCs are unverified and could contain malware. Use at your own risk.
github · Created 2021-03-15 17:37:02 UTC · 746 stars · AI assessment 90%
Sudo Baron Samedit Exploit
github · Created 2021-02-09 19:25:18 UTC · 201 stars · AI assessment 90%
CVE-2021-3156非交互式执行命令
github · Created 2021-02-08 18:21:58 UTC · 51 stars · AI assessment 90%
CVE-2021-3156: Sudo heap overflow exploit for Debian 10
github · Created 2021-02-03 19:57:56 UTC · 151 stars · AI assessment 90%
Root shell PoC for CVE-2021-3156
github · Created 2021-01-30 20:39:58 UTC · 975 stars · AI assessment 90%
github · Created 2021-01-30 03:22:04 UTC · 435 stars · AI assessment 90%
PoC for CVE-2021-3156 (sudo heap overflow)
github · Created 2021-01-27 16:03:34 UTC · 111 stars · AI assessment 85%
CVE-2021-3156
Timeline
Exploit module available
Listed in the CISA Known Exploited Vulnerabilities catalog
Public proof-of-concept code published
Vulnerability disclosed publicly
Identifier reserved by the CNA
Pro API
Confidence, exploit status, sensor telemetry, PoCs, scanner integrations, mentions, and tags are available programmatically for VM, SOC, and CTI workflows.
GET /api/v2/pro/kevs/CVE-2021-3156
Free JSON includes basic KEV fields{
"cve_id": "CVE-2021-3156",
"confidence": "Confirmed",
"cvss_score": 7.8,
"cvss_estimated": false,
"epss_score": 0.99295,
"exploit_status": {
"exploited_in_the_wild": true,
"active_exploitation_observed": false
},
"sensor_telemetry": { "attempts": 0, "sensors": 0 }
}
Early warning alerts
Receive curator-selected alerts when exploitation activity warrants attention. Each alert includes the evidence and context needed to decide what requires attention now.