Sudo · Sudo · CWE-122 · CWE-193 · published 2021-01-26
CVE-2021-3156Sudo Heap-Based Buffer Overflow Vulnerability
This week Known exploited in the wild.
CVE-2021-3156 is actively exploited in the wild: CISA added it to the Known Exploited Vulnerabilities catalog on 2022-04-06. EPSS estimates a 100% chance of exploitation in the next 30 days, higher than 99% of all CVEs. This Sudo vulnerability: CVSS 7.8 (v3.1), a successful attack gives total control of the component. Patched packages are out for Debian, Ubuntu and Red Hat Enterprise Linux. US federal agencies must remediate by 2022-04-27. Patch this week.
Jump to: Remediation Exploit intelAffected versionsDescription
Remediation#
CISA required action: Apply updates per vendor instructions. (federal due date 2022-04-27)
Linux distribution packages
If you run the distro’s package rather than an upstream build, this is the version to look for.
| Distro | Release | Package | Status |
|---|---|---|---|
| Debian | 13 trixie | sudo | Fixed in 1.9.5p1-1.1 |
| 12 bookworm | sudo | Fixed in 1.9.5p1-1.1 | |
| Ubuntu | 20.04 LTS | sudo | Fixed in 1.8.31-1ubuntu1.2 |
| 18.04 LTS | sudo | Fixed in 1.8.21p2-3ubuntu1.4 | |
| 16.04 LTS | sudo | Fixed in 1.8.16-0ubuntu1.10 | |
| Red Hat Enterprise Linux | RHEL 9 | sudo | Not affected |
| RHEL 8 | sudo | Fixed in 1.8.29-6.el8_3.1 RHSA-2021:0218 | |
| RHEL 7 | sudo | Fixed in 1.8.23-10.el7_9.1 RHSA-2021:0221 | |
| RHEL 5 | sudo | Not affected |
From the Debian Security Tracker, Ubuntu security notices (CC BY-SA 4.0) and Red Hat Security Data (CC BY 4.0). Check the distro link before acting.
Patch events
Library & CLI toolSudo
Heap-Based Buffer OverflowCVE-2021-3156
Why: Known exploited in the wild.
Exploit intelligence#
| Signal | Value | Source |
|---|---|---|
| Known exploited | Yes, added 2022-04-06 | CISA KEV |
| Ransomware use | Unknown | CISA KEV |
| EPSS (30-day exploitation probability) | 100% (100th pct) | FIRST EPSS v2026.06.15 |
| CVSS base score | 7.8 (v3.1)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | CNA / CISA ADP |
| SSVC exploitation | active | CISA Vulnrichment |
| SSVC automatable | No | CISA Vulnrichment |
| SSVC technical impact | total | CISA Vulnrichment |
Weakness: CWE-122: Heap-based Buffer Overflow · CWE-193: Off-by-one Error
More from this vendor: all Sudo vulnerabilities · recent KEV additions
Affected versions (from the CVE record)#
- Product
n/a(affected)
Description (from the CVE record)#
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.
Quoted from the CVE Program record.