# CVE-2021-3156: Sudo Heap-Based Buffer Overflow Vulnerability

- Severity: High 7.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: yes. In CISA's catalogue since 2022-04-06. Apply updates per vendor instructions.
- Likelihood of exploitation in the next 30 days (EPSS): 99.9%, higher than 99% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 12 links below, marked "exploit"
- Published: 2021-01-26T00:00:00.000Z
- Modified: 2026-06-17T04:04:45.830Z
- Weaknesses: CWE-122, CWE-193
- SSVC (CISA-ADP): exploitation active, automatable no, technical impact total
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- sudo_project sudo: from 1.8.2 before 1.8.32; from 1.9.0 before 1.9.5; 1.9.5
- fedoraproject fedora: 32; 33
- debian debian_linux: 9.0; 10.0
- netapp active_iq_unified_manager: no versions given
- netapp cloud_backup: no versions given
- netapp hci_management_node: no versions given
- netapp oncommand_unified_manager_core_package: no versions given
- netapp ontap_select_deploy_administration_utility: no versions given
- netapp ontap_tools: 9
- netapp solidfire: no versions given
- mcafee web_gateway: 8.2.17; 9.2.8; 10.0.4
- synology diskstation_manager_unified_controller: 3.0
- synology diskstation_manager: 6.2
- synology skynas_firmware: no versions given
- synology vs960hd_firmware: no versions given
- beyondtrust privilege_management_for_mac: before 21.1.1
- beyondtrust privilege_management_for_unix/linux: before 10.3.2-10
- oracle micros_compact_workstation_3_firmware: 310
- oracle micros_es400_firmware: from 400 up to 410
- oracle micros_kitchen_display_system_firmware: 210
- oracle micros_workstation_5a_firmware: 5a
- oracle micros_workstation_6_firmware: from 610 up to 655
- oracle communications_performance_intelligence_center: from 10.3.0.0.0 up to 10.3.0.2.1; from 10.4.0.1.0 up to 10.4.0.3.1
- oracle tekelec_platform_distribution: from 7.4.0 up to 7.7.1
- Sudo Sudo: no versions given

## Every score

- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.2 High `AV:L/AC:L/Au:N/C:C/I:C/A:C`

## References

- <http://seclists.org/fulldisclosure/2021/Jan/79> (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/02/15/1> (exploit, mailing-list, third-party-advisory)
- <https://www.openwall.com/lists/oss-security/2021/01/26/3> (exploit, mailing-list, third-party-advisory)
- <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://www.openwall.com/lists/oss-security/2024/01/30/6> (exploit, mailing-list)
- <http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html> (exploit, third-party-advisory, vdb-entry)
- <http://seclists.org/fulldisclosure/2024/Feb/3> (exploit, mailing-list, third-party-advisory)
- <https://www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156> (exploit, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2021/01/msg00022.html> (mailing-list, third-party-advisory)
- <https://security.gentoo.org/glsa/202101-33> (third-party-advisory, vendor-advisory)
- <https://www.debian.org/security/2021/dsa-4839> (third-party-advisory, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/> (mailing-list, release-notes, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/> (mailing-list, release-notes, vendor-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)
- <https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM> (third-party-advisory, vendor-advisory)
- <https://www.kb.cert.org/vuls/id/794544> (third-party-advisory, us-government-resource)
- <http://seclists.org/fulldisclosure/2021/Feb/42> (mailing-list, third-party-advisory)
- <https://www.oracle.com//security-alerts/cpujul2021.html> (patch, third-party-advisory)
- <https://www.sudo.ws/stable.html#1.9.5p2> (release-notes)
- <https://security.netapp.com/advisory/ntap-20210128-0002/> (third-party-advisory)
- <https://security.netapp.com/advisory/ntap-20210128-0001/> (third-party-advisory)
- <https://support.apple.com/kb/HT212177> (third-party-advisory)
- <https://kc.mcafee.com/corporate/index?page=content&id=SB10348> (broken-link, 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.synology.com/security/advisory/Synology_SA_21_02> (third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2021/09/14/2> (mailing-list, patch, third-party-advisory)
- <https://www.oracle.com/security-alerts/cpuoct2021.html> (patch, third-party-advisory)
- <https://www.oracle.com/security-alerts/cpuapr2022.html> (patch, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2024/01/30/8> (mailing-list)
- <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-3156> (government-resource, us-government-resource)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3156> (kev)

## Sources

- CVE List: [CVE-2021-3156](https://www.cve.org/CVERecord?id=CVE-2021-3156), CVE Terms of Use, modified 2025-10-21
- NVD: [CVE-2021-3156](https://nvd.nist.gov/vuln/detail/CVE-2021-3156), Public domain, modified 2026-06-17
- CISA KEV: [CVE-2021-3156](https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2021-3156), CC0-1.0, modified 2022-04-06

---

Page: https://cve.day/CVE-2021-3156 · Whole record: https://cve.day/CVE-2021-3156.json · Rebuilt by cve.day 2026-11-25T22:57:59.737Z
