CVE-2021-3156

Exp

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: 2021-01-26 Last update: 2025-11-10 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-3156 is rated Critical Active Threat (91.2/100): CVSS High severity, with high exploitation likelihood (EPSS 92.55%, 100th percentile). Core evidence: CISA KEV confirms active exploitation (added 2022-04-06) affecting Sudo / Sudo. a weakness (CWE-193) Unauthenticated remote administrative access may be possible. Mandatory action: The CISA remediation deadline has passed—treat as an emergency patch priority.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

CISA KEV Record for CVE-2021-3156

Name: Sudo Heap-Based Buffer Overflow Vulnerability · CISA KEV detail

Exploit added: 2022-04-06

Action due: 2022-04-27

Required action: Apply updates per vendor instructions.

Public exploit references (Exploit-DB) for CVE-2021-3156

EDB-ID Source Kind Published Link
49522 exploit_db edb 2021-02-03 Exploit-DB ↗
49521 exploit_db edb 2021-02-03 Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-3156

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-24 92.46% 92.55% +0.10%
2 2026-04-22 92.20% 92.46% +0.26%
3 2026-04-21 92.20%

Full EPSS history (102 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-3156

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0
7.2 2.0 HIGH
AV:L/AC:L/Au:N/C:C/I:C/A:C Click to expand
Access vector (AV:L)
Requires local access to the target system.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:C)
Complete confidentiality impact.
Integrity impact (I:C)
Complete integrity impact.
Availability impact (A:C)
Complete availability impact.
3.9 10.0 [email protected]

Weakness enumeration for CVE-2021-3156

OS Trackers for CVE-2021-3156

vendor priority summary link
alpine CVE-2021-3156: 1 source package rows (sudo); 22 state rows across 11 repos (3.10-main, 3.11-main, 3.12-main, 3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community, edge-main); fixed 12, open 10. https://security.alpinelinux.org/vuln/CVE-2021-3156
debian not yet assigned CVE-2021-3156 not yet assigned priority: Debian including 1 source packages (sudo), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-3156
gentoo high CVE-2021-3156: 1 GLSA(s) (202101-33), 1 atom(s) (app-admin/sudo); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-3156
redhat high https://access.redhat.com/security/cve/CVE-2021-3156
suse high CVE-2021-3156 severity important: SUSE including 294 source package names (1.1.1.0.1.5.424:sudo-1.8.22-4.18.1, 1.2.0.0.1.5.430:sudo-1.8.22-4.18.1, …), 372 product×package rows across 93 product lines (Container ses/6/cephcsi/cephcsi, Container ses/6/rook/ceph, … (93 product lines)): Fixed 244, Known Affected 124, Known Not Affected 4. https://www.suse.com/security/cve/CVE-2021-3156/
ubuntu high CVE-2021-3156 high priority: Ubuntu including 1 source packages (sudo), 6 status rows across 6 suites (bionic, focal, groovy, trusty, upstream, xenial): released 6. https://ubuntu.com/security/CVE-2021-3156

Affected software / configurations for CVE-2021-3156

Vendor Product Version Raw CPE
sudo_project sudo >= 1.8.2, < 1.8.32 cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
sudo_project sudo >= 1.9.0, < 1.9.5 cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
sudo_project sudo 1.9.5 cpe:2.3:a:sudo_project:sudo:1.9.5:-:*:*:*:*:*:*
sudo_project sudo 1.9.5 cpe:2.3:a:sudo_project:sudo:1.9.5:patch1:*:*:*:*:*:*
fedoraproject fedora 32 cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
fedoraproject fedora 33 cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
netapp active_iq_unified_manager cpe:2.3:a:netapp:active_iq_unified_manager:-:*:*:*:*:vmware_vsphere:*:*
netapp cloud_backup cpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:*
netapp hci_management_node cpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:*
netapp oncommand_unified_manager_core_package cpe:2.3:a:netapp:oncommand_unified_manager_core_package:-:*:*:*:*:*:*:*
netapp ontap_select_deploy_administration_utility cpe:2.3:a:netapp:ontap_select_deploy_administration_utility:-:*:*:*:*:*:*:*
netapp ontap_tools 9 cpe:2.3:a:netapp:ontap_tools:9:*:*:*:*:vmware_vsphere:*:*
netapp solidfire cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*
mcafee web_gateway 8.2.17 cpe:2.3:a:mcafee:web_gateway:8.2.17:*:*:*:*:*:*:*
mcafee web_gateway 9.2.8 cpe:2.3:a:mcafee:web_gateway:9.2.8:*:*:*:*:*:*:*
mcafee web_gateway 10.0.4 cpe:2.3:a:mcafee:web_gateway:10.0.4:*:*:*:*:*:*:*
synology diskstation_manager_unified_controller 3.0 cpe:2.3:a:synology:diskstation_manager_unified_controller:3.0:*:*:*:*:*:*:*
synology diskstation_manager 6.2 cpe:2.3:o:synology:diskstation_manager:6.2:*:*:*:*:*:*:*
synology skynas_firmware cpe:2.3:o:synology:skynas_firmware:-:*:*:*:*:*:*:*
synology vs960hd_firmware cpe:2.3:o:synology:vs960hd_firmware:-:*:*:*:*:*:*:*
beyondtrust privilege_management_for_mac < 21.1.1 cpe:2.3:a:beyondtrust:privilege_management_for_mac:*:*:*:*:*:*:*:*
beyondtrust privilege_management_for_unix\/linux < 10.3.2-10 cpe:2.3:a:beyondtrust:privilege_management_for_unix\/linux:*:*:*:*:basic:*:*:*
oracle micros_compact_workstation_3_firmware 310 cpe:2.3:o:oracle:micros_compact_workstation_3_firmware:310:*:*:*:*:*:*:*
oracle micros_es400_firmware >= 400, <= 410 cpe:2.3:o:oracle:micros_es400_firmware:*:*:*:*:*:*:*:*
oracle micros_kitchen_display_system_firmware 210 cpe:2.3:o:oracle:micros_kitchen_display_system_firmware:210:*:*:*:*:*:*:*
oracle micros_workstation_5a_firmware 5a cpe:2.3:o:oracle:micros_workstation_5a_firmware:5a:*:*:*:*:*:*:*
oracle micros_workstation_6_firmware >= 610, <= 655 cpe:2.3:o:oracle:micros_workstation_6_firmware:*:*:*:*:*:*:*:*
oracle communications_performance_intelligence_center >= 10.3.0.0.0, <= 10.3.0.2.1 cpe:2.3:a:oracle:communications_performance_intelligence_center:*:*:*:*:*:*:*:*
oracle communications_performance_intelligence_center >= 10.4.0.1.0, <= 10.4.0.3.1 cpe:2.3:a:oracle:communications_performance_intelligence_center:*:*:*:*:*:*:*:*
oracle tekelec_platform_distribution >= 7.4.0, <= 7.7.1 cpe:2.3:a:oracle:tekelec_platform_distribution:*:*:*:*:*:*:*:*

References for CVE-2021-3156

URL Tags
http://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html Exploit Third Party Advisory VDB Entry
http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html Exploit Third Party Advisory VDB Entry
http://seclists.org/fulldisclosure/2021/Feb/42 Mailing List Third Party Advisory
http://seclists.org/fulldisclosure/2021/Jan/79 Exploit Mailing List Third Party Advisory
http://seclists.org/fulldisclosure/2024/Feb/3 Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/01/26/3 Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/01/27/1 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/01/27/2 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/02/15/1 Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2021/09/14/2 Mailing List Patch Third Party Advisory
http://www.openwall.com/lists/oss-security/2024/01/30/6 Exploit Mailing List
http://www.openwall.com/lists/oss-security/2024/01/30/8 Mailing List
https://kc.mcafee.com/corporate/index?page=content&id=SB10348 Broken Link Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/01/msg00022.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/ Mailing List Release Notes
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/ Mailing List Release Notes
https://security.gentoo.org/glsa/202101-33 Third 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/HT212177 Third Party Advisory
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM Third 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-vulnerability Third Party Advisory
https://www.debian.org/security/2021/dsa-4839 Third Party Advisory
https://www.kb.cert.org/vuls/id/794544 Third Party Advisory US Government Resource
https://www.openwall.com/lists/oss-security/2021/01/26/3 Exploit Mailing List Third Party Advisory
https://www.oracle.com//security-alerts/cpujul2021.html Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpuapr2022.html Patch Third Party Advisory
https://www.oracle.com/security-alerts/cpuoct2021.html Patch Third Party Advisory
https://www.sudo.ws/stable.html#1.9.5p2 Release Notes
https://www.synology.com/security/advisory/Synology_SA_21_02 Third Party Advisory
https://www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156 Exploit Third Party Advisory
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-3156 US Government Resource
cvelogic Threat Intelligence