CVE-2021-3156
CONFIRMED EXPLOITEDSudo Heap-Based Buffer Overflow Vulnerability
Is Sudo Sudo affected by CVE-2021-3156?
Sudo Sudo is listed in the CISA Known Exploited Vulnerabilities catalog for CVE-2021-3156, added on 2022-04-06. CISA only adds a CVE once it has evidence of exploitation in the wild, so the patching question is not whether it can be attacked but how soon your instances must be updated.
Affected products published by NIST NVD (32 vulnerable CPE entries): beyondtrust privilege_management_for_mac, beyondtrust privilege_management_for_unix\/linux, debian debian_linux, fedoraproject fedora, mcafee web_gateway and netapp active_iq_unified_manager and 18 further CPE product entries.
Published CPE version bounds mark releases below 21.1.1 as vulnerable. Those bounds describe what is affected, not what patches it: upgrade to the fixed release named in the vendor advisory below, then confirm the installed version with your package manager or scanner.
The CISA remediation deadline for this entry is 2022-04-27.
RELATED VULNERABILITY DOSSIERS
Other catalog entries that share this product, vendor, or weakness, or that sit next to this advisory in the CISA KEV timeline.
- CVE-2025-32463Same productSudo Sudo
Sudo Inclusion of Functionality from Untrusted Control Sphere Vulnerability
- CVE-2026-94127Shared weaknessF5 BIG-IP APM
F5 BIG-IP APM Heap-based Buffer Overflow Vulnerability
- CVE-2025-25249Shared weaknessFortinet Multiple Products
Fortinet Multiple Products Heap-based Buffer Overflow Vulnerability
- CVE-2026-85880Shared weaknessMicrosoft Windows
Microsoft Windows Heap-Based Buffer Overflow Vulnerability
- CVE-2021-31166Neighboring entryMicrosoft HTTP Protocol Stack
Microsoft HTTP Protocol Stack Remote Code Execution Vulnerability
- CVE-2017-11317Neighboring entryTelerik User Interface (UI) for ASP.NET AJAX
Telerik UI for ASP.NET AJAX Unrestricted File Upload Vulnerability
1. VULNERABILITY OVERVIEW & TECHNICAL MECHANISM
Sudo contains an off-by-one error that can result in a heap-based buffer overflow, which allows for privilege escalation.
Get Stack Watch email when a KEV hits your stack ($99/year or $12/month)
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.
2. AFFECTED VERSIONS, PRODUCTS & VERIFIED CPE CONFIGURATIONS
3. EXPLOITATION EVIDENCE, IMPACT & HOW TO DETECT IT
This vulnerability was added to the CISA Known Exploited Vulnerabilities (KEV) catalog on 2022-04-06. Inclusion in KEV requires verified evidence of active exploitation in the wild. Known ransomware campaign use is recorded by CISA as: "Unknown".
Note: KEV inclusion confirms that threat actors have exploited this flaw in real-world incidents; it does not imply every deployment of Sudo has been compromised.
- CVSS vector indicates high impact to Confidentiality (C:H), Integrity (I:H), and Availability (A:H) of the affected component.
- Kernel / local privilege surface (Sudo Sudo): monitor endpoint syscall and process telemetry (`Linux auditd`, `Tetragon` eBPF LSM/kprobe policies, Windows Security Event IDs 4672/4688 & Sysmon, `Velociraptor` VQL) for unexpected UID/token elevation, namespace escapes, or unauthorized child processes.
- Memory corruption class (CWE-119/416/787): monitor system logs (`dmesg`, `journalctl`, Windows Event ID 1000, crash dumps) for segmentation faults (`SIGSEGV`/`SIGABRT`) or worker process restarts.
- Inventory all hosts running Sudo Sudo and compare installed package/build versions against the NVD CPE configurations and vendor advisory below.
4. FIXED VERSION, MITIGATIONS & OFFICIAL ADVISORY CITATIONS
Apply updates per vendor instructions.
- http://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.htmlExploitThird Party AdvisoryVDB Entry
- http://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.htmlExploitThird Party AdvisoryVDB Entry
- http://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.htmlExploitThird Party AdvisoryVDB Entry
- http://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.htmlExploitThird Party AdvisoryVDB Entry
- http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.htmlExploitThird Party AdvisoryVDB Entry
- http://seclists.org/fulldisclosure/2021/Feb/42Mailing ListThird Party Advisory
- http://seclists.org/fulldisclosure/2021/Jan/79ExploitMailing ListThird Party Advisory
- http://seclists.org/fulldisclosure/2024/Feb/3ExploitMailing ListThird Party Advisory
- http://www.openwall.com/lists/oss-security/2021/01/26/3ExploitMailing ListThird Party Advisory
- http://www.openwall.com/lists/oss-security/2021/01/27/1Mailing ListThird Party Advisory
- http://www.openwall.com/lists/oss-security/2021/01/27/2Mailing ListThird Party Advisory
- http://www.openwall.com/lists/oss-security/2021/02/15/1ExploitMailing ListThird Party Advisory
- http://www.openwall.com/lists/oss-security/2021/09/14/2Mailing ListPatchThird Party Advisory
- http://www.openwall.com/lists/oss-security/2024/01/30/6ExploitMailing List
- http://www.openwall.com/lists/oss-security/2024/01/30/8Mailing List
- https://kc.mcafee.com/corporate/index?page=content&id=SB10348Broken LinkThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2021/01/msg00022.htmlMailing ListThird Party Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/Mailing ListRelease Notes
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/Mailing ListRelease Notes
- https://security.gentoo.org/glsa/202101-33Third Party Advisory
- https://security.netapp.com/advisory/ntap-20210128-0001/Third Party Advisory
- https://security.netapp.com/advisory/ntap-20210128-0002/Third Party Advisory
- https://support.apple.com/kb/HT212177Third Party Advisory
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcMThird Party Advisory
- https://www.beyondtrust.com/blog/entry/security-advisory-privilege-management-for-unix-linux-pmul-basic-and-privilege-management-for-mac-pmm-affected-by-sudo-vulnerabilityThird Party Advisory
SCORING & VECTOR TELEMETRY
Primary assessment authored by NIST NVD (nvd@nist.gov).
EPSS estimates the statistical probability of exploitation activity in the next 30 days—it is not proof of confirmed exploitation.
RELEVANT DEFENSIVE TOOLS
Curated open-source defensive and verification utilities from The Loot applicable to this asset class:
Endpoint visibility, digital forensics, and incident response (DFIR) platform
Network security monitoring (NSM) and protocol metadata extraction framework
Multi-threaded IDS, IPS, and network security monitoring engine
VirusTotal's memory-safe Rust rewrite of YARA for binary & implant hunting