CVE-2021-3156

HIGHNVD 7.89.0
EchelonGraph scoreMEDIUM confidence

Score elevated to 9.0 because this CVE is listed on the CISA Known Exploited Vulnerabilities catalog (added 2022-04-06), indicating real-world exploitation has been confirmed by US federal agencies. NVD baseline CVSS 7.8 retained for reference. Confidence: HIGH.

Triggered by: CISA KEV (actively exploited)
Sources: cisa_kev, epss, ghsa, nvd
Trending — 4 sources updated this weekExploited in the wild
7.8
EchelonGraph verdictPatch nowTreat as an emergency — this is being exploited.
  • Actively exploited in the wild (CISA-KEV)
CISA-KEV: ExploitedEPSS: 99%CVSS: 7.8Exploit: NoneExposed: 0

A fix is available — apply it.

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 v3
7.8
EG Score
9.0(medium)
EPSS
99.9%
KEV
⚠ Exploited

Published

January 26, 2021

Last Modified

November 10, 2025

Advisory Details (8)

Auto-updated Jun 4, 2026
🔬 Proof of concept available. No patch confirmed yet.
generic

oss-security - Re: Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)

http://www.openwall.com/lists/oss-security/2021/01/27/1
generic

oss-security - Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)

http://www.openwall.com/lists/oss-security/2021/01/26/3
generic🟡 PoC Available

Full Disclosure: CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog()

http://seclists.org/fulldisclosure/2024/Feb/3
generic

Full Disclosure: Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156)

http://seclists.org/fulldisclosure/2021/Jan/79
generic

Full Disclosure: 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

http://seclists.org/fulldisclosure/2021/Feb/42

Patch Availability(14)

Vendor / EcosystemFixed in / PatchReleasedSource
ubuntusudo-ldap (1.8.16-0ubuntu1.10) @ xenial2026-07-11ubuntu
ubuntusudo (1.8.9p5-1ubuntu1.5+esm6) @ trusty2026-07-11ubuntu
redhatredhat-virtualization-host-0:4.4.4-20210201.0.el8_32021-02-03redhat
redhatredhat-virtualization-host-0:4.3.13-20210127.0.el7_92021-02-03redhat
redhatsudo-0:1.8.23-10.el7_9.12021-01-27redhat
redhatsudo-0:1.8.23-3.el7_6.22021-01-27redhat
redhatsudo-0:1.8.19p2-12.el7_4.22021-01-26redhat
redhatsudo-0:1.8.6p7-17.el7_2.32021-01-26redhat
redhatsudo-0:1.8.6p3-29.el6_10.42021-01-26redhat
redhatsudo-0:1.8.23-4.el7_7.32021-01-26redhat
redhatsudo-0:1.8.29-6.el8_3.12021-01-26redhat
redhatsudo-0:1.8.29-5.el8_2.12021-01-26redhat
redhatsudo-0:1.8.25p1-8.el8_1.22021-01-26redhat
redhatsudo-0:1.8.6p7-23.el7_3.32021-01-26redhat

Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.

Weakness Classification(2)

MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.

All Vendor Advisories

(14)

Data Freshness Timeline

(refreshed 129× in last 7d / 552× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

Showing the most recent 100 of 772 total refreshes for this CVE.

  1. 2026-07-11 20:02 UTCEG score recompute
  2. 2026-07-11 20:02 UTCVendor advisory
  3. 2026-07-11 20:02 UTCGHSA enrichment
  4. 2026-07-11 16:01 UTCEG score recompute
  5. 2026-07-11 16:01 UTCVendor advisory
  6. 2026-07-11 16:01 UTCGHSA enrichment
  7. 2026-07-11 12:00 UTCEG score recompute
  8. 2026-07-11 12:00 UTCVendor advisory
  9. 2026-07-11 12:00 UTCGHSA enrichment
  10. 2026-07-11 07:59 UTCEG score recompute
  11. 2026-07-11 07:59 UTCVendor advisory
  12. 2026-07-11 07:59 UTCGHSA enrichment
  13. 2026-07-11 03:58 UTCEG score recompute
  14. 2026-07-11 03:58 UTCVendor advisory
  15. 2026-07-11 03:58 UTCGHSA enrichment
  16. 2026-07-10 23:57 UTCEG score recompute
  17. 2026-07-10 23:57 UTCVendor advisory
  18. 2026-07-10 23:57 UTCGHSA enrichment
  19. 2026-07-10 19:57 UTCEG score recompute
  20. 2026-07-10 19:57 UTCVendor advisory
  21. 2026-07-10 19:56 UTCGHSA enrichment
  22. 2026-07-10 17:52 UTCCISA KEV update
  23. 2026-07-10 15:55 UTCEG score recompute
  24. 2026-07-10 15:55 UTCVendor advisory
  25. 2026-07-10 15:55 UTCGHSA enrichment
Show 75 more
  1. 2026-07-10 11:54 UTCEG score recompute
  2. 2026-07-10 11:54 UTCVendor advisory
  3. 2026-07-10 11:54 UTCGHSA enrichment
  4. 2026-07-10 07:53 UTCEG score recompute
  5. 2026-07-10 07:53 UTCVendor advisory
  6. 2026-07-10 07:53 UTCGHSA enrichment
  7. 2026-07-10 03:53 UTCEG score recompute
  8. 2026-07-10 03:53 UTCVendor advisory
  9. 2026-07-10 03:53 UTCGHSA enrichment
  10. 2026-07-09 23:52 UTCEG score recompute
  11. 2026-07-09 23:52 UTCVendor advisory
  12. 2026-07-09 23:52 UTCGHSA enrichment
  13. 2026-07-09 19:52 UTCEG score recompute
  14. 2026-07-09 19:52 UTCVendor advisory
  15. 2026-07-09 19:51 UTCGHSA enrichment
  16. 2026-07-09 15:51 UTCEG score recompute
  17. 2026-07-09 15:51 UTCVendor advisory
  18. 2026-07-09 15:50 UTCGHSA enrichment
  19. 2026-07-09 11:47 UTCEG score recompute
  20. 2026-07-09 11:47 UTCVendor advisory
  21. 2026-07-09 11:47 UTCGHSA enrichment
  22. 2026-07-09 07:47 UTCEG score recompute
  23. 2026-07-09 07:47 UTCVendor advisory
  24. 2026-07-09 07:47 UTCGHSA enrichment
  25. 2026-07-09 03:44 UTCEG score recompute
  26. 2026-07-09 03:44 UTCVendor advisory
  27. 2026-07-09 03:44 UTCGHSA enrichment
  28. 2026-07-08 23:43 UTCEG score recompute
  29. 2026-07-08 23:43 UTCVendor advisory
  30. 2026-07-08 23:43 UTCGHSA enrichment
  31. 2026-07-08 19:42 UTCEG score recompute
  32. 2026-07-08 19:42 UTCVendor advisory
  33. 2026-07-08 19:42 UTCGHSA enrichment
  34. 2026-07-08 15:41 UTCEG score recompute
  35. 2026-07-08 15:41 UTCVendor advisory
  36. 2026-07-08 15:41 UTCGHSA enrichment
  37. 2026-07-08 11:40 UTCEG score recompute
  38. 2026-07-08 11:40 UTCVendor advisory
  39. 2026-07-08 11:40 UTCGHSA enrichment
  40. 2026-07-08 07:38 UTCEG score recompute
  41. 2026-07-08 07:38 UTCVendor advisory
  42. 2026-07-08 07:38 UTCGHSA enrichment
  43. 2026-07-08 03:37 UTCEG score recompute
  44. 2026-07-08 03:37 UTCVendor advisory
  45. 2026-07-08 03:37 UTCGHSA enrichment
  46. 2026-07-07 23:37 UTCEG score recompute
  47. 2026-07-07 23:37 UTCVendor advisory
  48. 2026-07-07 23:36 UTCGHSA enrichment
  49. 2026-07-07 19:36 UTCEG score recompute
  50. 2026-07-07 19:36 UTCVendor advisory
  51. 2026-07-07 19:36 UTCGHSA enrichment
  52. 2026-07-07 19:01 UTCCISA KEV update
  53. 2026-07-07 17:16 UTCCISA KEV update
  54. 2026-07-07 15:35 UTCEG score recompute
  55. 2026-07-07 15:35 UTCVendor advisory
  56. 2026-07-07 15:35 UTCGHSA enrichment
  57. 2026-07-07 11:32 UTCEG score recompute
  58. 2026-07-07 11:32 UTCVendor advisory
  59. 2026-07-07 11:32 UTCGHSA enrichment
  60. 2026-07-07 07:32 UTCEG score recompute
  61. 2026-07-07 07:32 UTCVendor advisory
  62. 2026-07-07 07:32 UTCGHSA enrichment
  63. 2026-07-07 03:30 UTCEG score recompute
  64. 2026-07-07 03:30 UTCVendor advisory
  65. 2026-07-07 03:30 UTCGHSA enrichment
  66. 2026-07-06 23:30 UTCEG score recompute
  67. 2026-07-06 23:30 UTCVendor advisory
  68. 2026-07-06 23:30 UTCGHSA enrichment
  69. 2026-07-06 19:29 UTCEG score recompute
  70. 2026-07-06 19:29 UTCVendor advisory
  71. 2026-07-06 19:29 UTCGHSA enrichment
  72. 2026-07-06 15:28 UTCEG score recompute
  73. 2026-07-06 15:28 UTCVendor advisory
  74. 2026-07-06 15:28 UTCGHSA enrichment
  75. 2026-07-06 11:27 UTCEG score recompute

Publicly available exploits

(10 references)

Working exploit code is in the public domain (8 GitHub PoCs) (2 Exploit-DB entries). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.

  • GitHub PoC0x4ndy/clif
    First seen Nov 28, 2022

    clif is a command-line interface (CLI) application fuzzer, pretty much what wfuzz or ffuf are for web. It was inspired by sudo vulnerability CVE-2021-3156 and the fact that for some reasons, Google's afl-fuzz doesn't allow for unlimited argument or option specification.

    Open source ↗
  • GitHub PoCLiveOverflow/pwnedit
    First seen Apr 29, 2021

    CVE-2021-3156 - Sudo Baron Samedit

    Open source ↗
  • GitHub PoCworawit/CVE-2021-3156
    First seen Mar 15, 2021

    Sudo Baron Samedit Exploit

    Open source ↗
  • GitHub PoCRvn0xsy/CVE-2021-3156-plus
    First seen Feb 9, 2021

    CVE-2021-3156非交互式执行命令

    Open source ↗
  • GitHub PoC0xdevil/CVE-2021-3156
    First seen Feb 8, 2021

    CVE-2021-3156: Sudo heap overflow exploit for Debian 10

    Open source ↗
  • Exploit-DBEDB-49521
    First seen Feb 3, 2021

    Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (1)

    Open source ↗
  • Exploit-DBEDB-49522
    First seen Feb 3, 2021

    Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (2)

    Open source ↗
  • GitHub PoCCptGibbon/CVE-2021-3156
    First seen Feb 3, 2021

    Root shell PoC for CVE-2021-3156

    Open source ↗
  • GitHub PoCblasty/CVE-2021-3156
    First seen Jan 30, 2021
    Open source ↗
  • GitHub PoCstong/CVE-2021-3156
    First seen Jan 30, 2021

    PoC for CVE-2021-3156 (sudo heap overflow)

    Open source ↗

Frequently asked(6)

What is CVE-2021-3156?
CVE-2021-3156 is a high vulnerability published on January 26, 2021. 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.
When was CVE-2021-3156 disclosed?
CVE-2021-3156 was first published in the National Vulnerability Database on January 26, 2021, with the most recent update on November 10, 2025. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2021-3156 actively exploited?
Yes. CISA added CVE-2021-3156 to the Known Exploited Vulnerabilities catalog on April 6, 2022, affecting Sudo Sudo. KEV listing indicates confirmed exploitation in the wild; this CVE warrants immediate patching attention.
What is the CVSS score of CVE-2021-3156?
CVE-2021-3156 has a CVSS v3 base score of 7.8 (NVD). EchelonGraph synthesises NVD + CISA KEV + FIRST EPSS + GHSA into a combined EG score of 9.0.
Which products are affected by CVE-2021-3156?
CVE-2021-3156 affects Sudo Sudo. The full affected-products list, including version ranges and fixed versions, is shown in the Affected Packages section of this page.
How do I remediate CVE-2021-3156?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2021-3156, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2021-3156

Explore →

Is Your Infrastructure Affected by CVE-2021-3156?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.