CVE-2021-3156
Exploitation confirmed. First attested on 2022-04-06 by CISA-ADP, CISA KEV, GCVE · kevintel.
- Published2021-01-26
- WeaknessCWE-193
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
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.
Timeline
dates in UTC- 2021-01-2621:15CVE publishedNVD
- 2021-02-03Exploit-DB entryExploit-DB
- 2022-04-06Added to the CISA KEV catalogCISA KEV
- 2022-04-06Listed as exploited by GCVEGCVE
- 2022-04-06Exploitation first reportedCISA KEV
- 2025-02-0315:43SSVC exploitation set to activeCISA-ADP
Observed activity
isMalicious corpus · updated 2026-11-04 03:37 UTCBlock these indicators
- Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-3156?format=txt
- CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-3156?format=csv
- TAXII collection of exploited CVEs
- The EDL and CSV take an API key on the Pro plan.
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 8.2 | = 8.2.17 | no fix published | NVD |
| 9.2 | = 9.2.8 | no fix published | NVD |
| 10.0 | = 10.0.4 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 1.9 | ≥ 1.9.0, < 1.9.5 | 1.9.5 | NVD |
| 1.8 | ≥ 1.8.2, < 1.8.32 | 1.8.32 | NVD |
| 1.9 | = 1.9.5 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 9.0 | = 9.0 | no fix published | NVD |
| 10.0 | = 10.0 | no fix published | NVD |
21 more products in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- redhat-virtualization-hostRed Hat:rhev_hypervisor:4.4::el8all versions · fixed in 0:4.4.4-20210201.0.el8_3and 1 other package
- redhat-virtualization-hostRed Hat:enterprise_linux:7::hypervisorall versions · fixed in 0:4.3.13-20210127.0.el7_9and 1 other package
- sudoUbuntu:Pro:14.04:LTSall versions · fixed in 1.8.9p5-1ubuntu1.5+esm6
- sudoUbuntu:20.04:LTSall versions · fixed in 1.8.31-1ubuntu1.2
- sudoUbuntu:18.04:LTSall versions · fixed in 1.8.21p2-3ubuntu1.4
- sudoUbuntu:16.04:LTSall versions · fixed in 1.8.16-0ubuntu1.10
- sudoTuxCare:RHEL:7all versions · fixed in 1.8.23-10.el7_9.3.tuxcare.els2and 1 other package
- sudoTuxCare:OracleLinux:6all versions · fixed in 1.8.6p3-30.el6.cloudlinux.els6and 1 other package
114 more package ranges on OSV.dev
Vendor advisories
sudo: Heap buffer overflow in argument parsing
Hitachi Energy TXpert Hub CoreTec 4 Sudo Vulnerability
TXpert Hub CoreTec 4: version 2.0.0 2.0.1 · TXpert Hub CoreTec 4: version 2.1.0 2.1.1 2.1.2 2.1.3 · TXpert Hub CoreTec 4: version 2.2.0 2.2.1
Johnson Controls CEM Systems AC2000
CEM Systems AC2000: All versions prior to Version 10.6
Johnson Controls Sensormatic Electronics Illustra
Insight: All versions prior to 1.4.0 · Pro 2: All versions · Flex Gen 2: All versions prior to 1.9.4 · +1 more
Johnson Controls Sensormatic Electronics VideoEdge
VideoEdge: versions prior to 5.7.0
Johnson Controls Sensormatic Tyco AI
Tyco AI: All versions up to and including v1.2
13 more advisories
Fix
- CISA’s required action: Apply updates per vendor instructions.due 2022-04-27
- Vendor fix CISA ICSA-22-256-01 · 3 productsTXpert Hub CoreTec 4: version 2.3.0
- Vendor fix CISA ICSA-22-256-01 · 3 productsAdditionally, Hitachi Energy recommends following product Security Deployment Guidelines. Recommended practices for the affected product can be found in the TXpert Hub CoreTec 4 Software Manual.
- Vendor fix CISA ICSA-21-245-01 · 4 productsPro Gen 3: upgrade to Version 2.8.0
- Vendor fix CISA ICSA-21-147-02 · 1 productJohnson Controls recommends users upgrade to the latest VideoEdge release (currently 5.7.0). If this is not possible, a sudo patch is available from the American Dynamics website for VideoEdge 5.4.2 and 5.6.0. VideoEdge 5.4.1 and older cannot be patched and should be upgraded.
- Vendor fix CISA ICSA-21-133-02 · 1 productJohnson Controls recommends users update to Tyco AI v1.3, which includes the updates for the SUSE Linux operating system. Users are encouraged to contact Tyco technical support for assistance.
- Vendor fix Red Hat Product Security RHSA-2021:0401 · 2 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/2974891 After installing this update, the smb service will be restarted automatically.
Advisories and patches
- www.openwall.comPatch
- lists.fedoraproject.orgRelease Notes
- lists.fedoraproject.orgRelease Notes
- www.oracle.comPatch
- www.oracle.comPatch
- www.oracle.comPatch
Detection
read 2026-11-03 22:42 UTC- Nuclei template
- none so far ProjectDiscovery
- Proof-of-concept repositories
- 20 repositories, unverifiedmr-r3b00t/CVE-2021-3156nexcess/sudo_cve-2021-3156reverse-ex/CVE-2021-3156unauth401/CVE-2021-3156ymrsmns/CVE-2021-3156 PoC-in-GitHub
- Metasploit modules
- 1 moduleexploit/linux/local/sudo_baron_sameditrank: excellentModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause. Metasploit Framework
CISA Known Exploited Vulnerability
- Date Added
- 2022-04-06
- Patch Due Date
- 2022-04-27
- Ransomware Use
- Unknown
- Required Action
- Apply updates per vendor instructions.
Sources
- CISA KEVKEV entry2022-04-06
- ENISA EUVDexploitation2022-04-062022-04-06
- GCVEexploitation2022-04-06
- CISA-ADPSSVC decisionactive2025-02-03
- OpenCVESSVC decisionactive—
- CISA-ADPCVSS 3.17.82025-02-03
- NVDCVSS 3.17.8read 2026-10-23
- NVDCVSS 2.07.2read 2026-10-23
- CISA-ADPweakness (CWE)CWE-1932025-02-03
- NVDweakness (CWE)CWE-193read 2026-10-23
- FIRST EPSSEPSS score99.9 %read 2026-11-03
- PoC-in-GitHubproof of concept20read 2026-11-03
- Exploit-DBdetectionread 2026-11-03
- Metasploit FrameworkMetasploit modules1known since 2026-11-01
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- EUVD-2021-26500same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-w5vh-2923-gp5csame flawGitHub Advisory Database · CC-BY-4.0
- exploit/linux/local/sudo_baron_sameditexploit moduleMetasploit Framework © Rapid7 · BSD-3-Clause
- DLA-2534-1advisory covering several CVEsDebian · LicenseRef-unstated
- DSA-4839-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0056advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1002advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2021:0169-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:0170-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:0602-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11413-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:0218advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0219advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0220advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0221advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0222advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0223advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0224advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0225advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0226advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0227advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0395advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:0401advisory covering several CVEsRed Hat · CC-BY-4.0
- SUSE-SU-2021:0225-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0226-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0227-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0232-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:0928-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1267-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1273-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1274-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:1275-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2024:4389-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4705-1advisory covering several CVEsUbuntu
- USN-4705-2advisory covering several CVEsUbuntu
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Published
- 2021-01-26
- Last Modified
- 2026-06-17
- NVD status
- Analyzed
- GitHub Advisory
- GHSA-w5vh-2923-gp5c
Frequently asked questions
What is CVE-2021-3156?
Is CVE-2021-3156 actively exploited?
What is the CVSS score for CVE-2021-3156?
Running sudo? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- For a threat intelligence platform: malware, C2 and ransomware indicators over STIX/TAXII.
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CISA ICS advisories (CSAF) · Public domain (US Government work)
- CISA KEV · CC0-1.0 (cisagov/kev-data)
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- Exploit-DB · Exploit-DB terms of service · terms restrict redistribution
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GCVE · GCVE dump terms (preserve source attribution)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-w5vh-2923-gp5c
- Metasploit Framework · BSD-3-Clause
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OpenCVE · OpenCVE terms of service · terms restrict redistribution
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0