CVE-2021-3156
CVE-2021-3156 — Sudo Heap-Based Buffer Overflow Vulnerability
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.
Published Updated Sources: NVD, Sudo (CNA), CISA, FIRST EPSS, GitHub, GitHub Security Advisory, Exploit-DB, Red Hat (VEX), SOCRadar CTI
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Confirmed
CISA KEV, listed Apr 6, 2022
EPSS
100%
top of FIRST's scoreset
CVSS base
7.8
high · 2 sources
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
Active
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Total
partial · total control of the vulnerable component
Remediation
The vendor's own words where we have them.
Upgrade Sudo to a fixed release. Apply vendor patches per advisory and restrict external exposure of the affected component until patched.
CISA required action
Apply updates per vendor instructions.
Federal deadline Apr 27, 2022 — passed 1,682 days ago
Red Hat VEX · CVE-2021-3156
vendor_fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
vendor_fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
vendor_fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
First 24 hours
Ordered from the record's own fields — exposure first, because you cannot patch what you have not found.
- Identify exposed assets running affected vendor/product/version combinations.
- Treat as emergency remediation because CISA KEV status is present.
- Search available logs for exploit probes, errors, authentication anomalies, or suspicious child processes matching the vulnerability class.
Affected scope
Vendor, product and version as the advisories word them.
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Sudo | Sudo | n/a | Vulnerable |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Availability
High
Confidentiality
High
Integrity
High
Scope
Unchanged
Attack Complexity
Low
Attack Vector
Local
Privileges Req
Low
User Interaction
None
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 7.8 | CVSS 3.1 | high | 1.8 | 5.9 | NVD, CNA, GHSA, Red Hat (VEX) |
| 7.2 | CVSS 2.0 | high | 3.9 | 10 | NVD |
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
What this weakness leads to
MITRE's own consequences and mitigations for the weakness class — the authority's wording, not guidance derived from the CVSS vector.
CWE-193 · Off-by-one Error
- DoS: Crash, Exit, or Restart
- DoS: Resource Consumption (CPU)
- DoS: Resource Consumption (Memory)
- DoS: Instability
Mitigation: When copying character arrays or using character manipulation methods, the correct size parameter must be used to account for the null terminator that needs to be added at the end of the array. Some examples of functions susceptible to this weakness in C include strcpy(), strncpy(), strcat(), strncat(), printf(), sprintf(), scanf() and sscanf().::
Weakness & attack patterns
- CWE-193
- CWE-787Out-of-bounds Write
Inferred from the weakness class — not observed against this CVE.
CISA KEV details
CISA lists a CVE here once it has evidence of exploitation against real targets.
Listed
Apr 6, 2022
Federal deadline
Apr 27, 2022
passed 1,682 days ago
Ransomware use
Unknown
CISA records ransomware use only for campaigns it has confirmed, so “Unknown” means unrecorded, not ruled out. The deadline binds US federal agencies; for everyone else it is a date to argue against.
Public exploit
Capability, not use: code existing is a different claim from anyone running it.
PoC repos
499
2 of the 5 sampled are weaponized
Exploit entries
84
Exploit-DB and CTI exploit indexes
Malware
Families a CTI source ties to this CVE. One named, with the total it tracks.
Families tracked
2
Named
Cobalt Strike
Cobalt Strike
Social mentions
Posts naming this CVE. Attention, not evidence of exploitation — it spikes on disclosure and decays whether or not anything is exploited.
#threatreport #MediumCompleteness ARTEX: Agentic Asbestos | 05-11-2026 Source: https://t.co/w1liAEmFHt Key details below ↓ 🧑💻Actors/Campaigns: Storm-0940 💀Threats: Artex_tool, Cobalt_strike_tool, Adaptixc2_tool, Vshell, Nmap_tool, Godpotato_tool, Smbexec_tool, Wmiexec_tool, Passthehash_technique, Cyberstrikeai_tool, Mitm_technique, Fscan_tool, Supply_chain_technique, Password_spray_technique, He…
@rst_cloud· Nov 7, 2026
On this day, CVE-2021-3156: Baron Samedit, came to light. A heap overflow bug sat in sudo for nearly a decade before anyone found it, giving local users a path to root on most Linux systems. #CVE #LinuxSecurity
@exploitgrid· Jul 27, 2026
@tibfulv @LundukeJournal Sudo had a catastrophic heap buffer overflow (CVE-2021-3156) hiding in its "battle-tested" C code for 10 years before discovery. It granted instant root. C doesn't stop hiding zero-days just because it's old. Rust stops them at compile. But this is a healthy discussion.
@AristoSamos· Jun 30, 2026
The dataset: CVE-2021-3156 (sudo heap overflow), CVE-2022-0847 (Dirty Pipe), CVE-2023-38545 (curl SOCKS5). Real vulnerable functions from OpenSSL, Linux kernel, cURL.
@disismohi· Jun 5, 2026
I just completed Baron Samedit room on TryHackMe! A tutorial room exploring CVE-2021-3156 in the Unix Sudo Program. Room Three in the SudoVulns Series https://t.co/LtvzmWW0WI #tryhackme via @tryhackme
@acupunc28094787· Apr 25, 2026
13 more posts on this CVEShowing 5 of 18 · Who is discussing this CVE, and how loudlyUnlock freeDetection rules
Sigma and YARA rules a source published for this CVE — the only detection content any connected source supplies.

- YARALinux_Exploit_CVE_2021_3156_f3fb10cd
- SIGMACVE-2021-3156 Exploitation Attempt
- SIGMACVE-2021-3156 Exploitation Attempt
- YARALinux_Exploit_CVE_2021_3156_f3fb10cd
- SIGMACVE-2021-3156 Exploitation Attempt
3 more detection rules on this CVEShowing 5 of 8 · Sigma and YARA content you can deploy todayUnlock freeDetection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Monitor for scanner or exploit-pattern traffic after 583 public PoC repositories were reported.
Groups associated with this CVE
Groups reported in connection with this vulnerability. A reported association, not a confirmed observation of that group using it — and not scoped to any sector or campaign.
9 more threat groups on this CVEShowing 5 of 14 · Attribution, campaigns and the malware each one runsUnlock free- ip138.204.196.25477
Maltiverse URL List · Dec 8, 2023
- hash3b1329e81739b1ea6acbb4ec4dff11f02ff42570100
Cyber Threat Alliance (CTA) · Nov 27, 2023
- hashf34bd1d485de437fe18360d1e850c3fd64415e49d691e610711d8d232071a0b1100
Cyber Threat Alliance (CTA) · Jul 27, 2023
- hash89ae36448f1922870f1a09c29f17c775100
Cyber Threat Alliance (CTA) · Oct 21, 2023
- hash44e83f84a5d5219e2f7c3cf1e4f02489cae81361227f46946abe4b8d8245b87999
Kaspersky Public Requests · Aug 18, 2022
5 more indicators on this CVEShowing 5 of 10 · Hashes, addresses and domains from a live threat exchangeUnlock freeTimeline
What happened to this CVE, newest first — with the readings a source repeats on a schedule counted underneath rather than listed.
- 2026
Cve is exploited tkien207/CVE-2021-3156
Nov 20, 2026 · SOCRadar CTI
Cve is exploited HanaBouikni/Volatility3-Forensics-Incident-Response
Nov 16, 2026 · SOCRadar CTI
Cve is exploited d4ytox/CVE-2021-3156
Nov 2, 2026 · SOCRadar CTI
Cve is exploited Kranti08/CVE-2021-3156-Baron-Samedit
Jun 27, 2026 · SOCRadar CTI
Added · CVSS 3.1 7.8 (AV:L)
Jun 17, 2026 · NVD
Cve is exploited calonnuotcabe/CVE-2021-3156
Jun 3, 2026 · SOCRadar CTI
- 2022
Added · GHSA-w5vh-2923-gp5c published (high)
May 24, 2022 · GitHub Security Advisory
Added to CISA KEV catalog
Apr 6, 2022 · CISA
- 2021
Added · local entry: Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (1)
Feb 3, 2021 · Exploit-DB
Added · local entry: Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (2)
Feb 3, 2021 · Exploit-DB
Initial · CVE published
Jan 26, 2021 · NVD
Source activity
Readings a source repeats on a schedule, counted rather than listed.
- 15×SVRS was changedApr 6, 2026 – Nov 20, 2026 · SOCRadar CTI
- 12×Github ReposMay 27, 2026 – Nov 14, 2026 · SOCRadar CTI
- 5×Tweets · 1 time tweeted.Apr 7, 2026 – Jul 28, 2026 · SOCRadar CTI
References
50 on the record
- packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html
Exploit, Third Party Advisory, VDB Entry, GITHUB, NIST
- packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html
Exploit, Third Party Advisory, VDB Entry, GITHUB, NIST
- packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html
Exploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html
Exploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html
Exploit, Third Party Advisory, VDB Entry, GITHUB, NIST
- seclists.org/fulldisclosure/2021/Feb/42
Mailing List, Third Party Advisory, Mitre, NIST
- seclists.org/fulldisclosure/2021/Jan/79
Exploit, Mailing List, Third Party Advisory, Mitre, NIST
- seclists.org/fulldisclosure/2024/Feb/3
Exploit, Mailing List, Third Party Advisory, GITHUB, Mitre, NIST
Coverage
9 stories from the feeds we poll
August 2026 CVE Landscape
recordedfuture.com · Sep 8, 2026
July 2026 CVE Landscape
recordedfuture.com · Aug 7, 2026
ISC StormCast for Wednesday, January 27th, 2021
isc.sans.edu · Jan 27, 2021
Weekly Intelligence Report – 28 Aug 2026 - cyfirma
cyfirma.com · Aug 28, 2026
SPECTRE Backdoor Blinds CrowdStrike and SentinelOne at Kernel Level Without Killing Them - Tech Times
techtimes.com · Aug 26, 2026
4 more reports on this CVEShowing 5 of 9 · Vendor research and security press coverageUnlock freeRelated CVEs
Same product first, then the same weakness or threat actor.
- CVE-2025-32463 Sudo Inclusion of Functionality from Untrusted Control Sphere VulnerabilityCVSS 7.8 · CISA KEV
- CVE-2025-43300 Apple iOS, iPadOS, and macOS Out-of-Bounds Write VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2025-24201 Apple Multiple Products WebKit Out-of-Bounds Write VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2021-35211 SolarWinds Serv-U Remote Code Execution VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2020-14871 Oracle Solaris and Zettabyte File System (ZFS) Unspecified VulnerabilityCVSS 10.0 · CISA KEV
- CVE-2026-111497 Out-of-Bounds Write in Google Brotli DecoderCVSS 9.8 · CISA KEV
Elsewhere on this site
- Sudoevery CVE for this vendor
- Sudoevery page on this product
- April 2022what else CISA listed
- Memory Corruptionsame class
- CWE-193other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- Only the 5 indicator(s) reported for this CVE are available; no packet-level or host-forensic artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record1
What should defenders know first?
CVE-2021-3156 is Sudo Heap-Based Buffer Overflow Vulnerability, a high vulnerability affecting Sudo from Sudo. The current evidence lists it in CISA KEV, and the exploit status is: Yes: CISA KEV signal present. Public exploit evidence is: 583 public PoC repositories reported; 2 marked weaponized in current dataset. The affected-version evidence is listed in the key facts and affected products tables. Defenders should first verify whether exposed or business-critical assets run those versions, then apply vendor patches or mitigations, restrict reachable attack surface, and preserve logs for detection review. CVSS 7.8 describes technical severity, while EPSS 100% helps estimate near-term exploit likelihood; neither replaces asset context. Unknown fields should remain explicit in tickets, and threat actor, IOC, victimology, or payload claims should not be added unless a cited source supports them. Monitor CISA KEV, vendor advisories, NVD changes, public PoC repositories, and internal telemetry for update triggers.