CVE-2021-3156
HIGH 7.8CVSS 3.1known exploitedSudo Heap-Based Buffer Overflow Vulnerability
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
- 26 Jan 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Analyzed
- Weakness
- CWE-122CWE-193
- Sources
- NVDJSONCISA KEVJSON
In CISA's Known Exploited Vulnerabilities catalog since 6 Apr 2022; US federal agencies must fix it by 27 Apr 2022.
Apply updates per vendor instructions.
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | HIGH 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.2 | AV:L/AC:L/Au:N/C:C/I:C/A:C |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | sudo_project | sudocpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:* |
>= 1.8.2, < 1.8.32 | 1.8.32 |
| NVD | sudo_project | sudocpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:* |
>= 1.9.0, < 1.9.5 | 1.9.5 |
| NVD | sudo_project | sudocpe:2.3:a:sudo_project:sudo:1.9.5:-:*:*:*:*:*:* |
= 1.9.5 | |
| NVD | sudo_project | sudocpe:2.3:a:sudo_project:sudo:1.9.5:patch1:*:*:*:*:*:* |
= 1.9.5 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* |
= 32 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
= 33 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* |
= 10.0 | |
| NVD | netapp | active_iq_unified_managercpe:2.3:a:netapp:active_iq_unified_manager:-:*:*:*:*:vmware_vsphere:*:* |
(no version) | |
| NVD | netapp | cloud_backupcpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | netapp | hci_management_nodecpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | netapp | oncommand_unified_manager_core_packagecpe:2.3:a:netapp:oncommand_unified_manager_core_package:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | netapp | ontap_select_deploy_administration_utilitycpe:2.3:a:netapp:ontap_select_deploy_administration_utility:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | netapp | ontap_toolscpe:2.3:a:netapp:ontap_tools:9:*:*:*:*:vmware_vsphere:*:* |
= 9 | |
| NVD | netapp | solidfirecpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | mcafee | web_gatewaycpe:2.3:a:mcafee:web_gateway:8.2.17:*:*:*:*:*:*:* |
= 8.2.17 | |
| NVD | mcafee | web_gatewaycpe:2.3:a:mcafee:web_gateway:9.2.8:*:*:*:*:*:*:* |
= 9.2.8 | |
| NVD | mcafee | web_gatewaycpe:2.3:a:mcafee:web_gateway:10.0.4:*:*:*:*:*:*:* |
= 10.0.4 | |
| NVD | synology | diskstation_manager_unified_controllercpe:2.3:a:synology:diskstation_manager_unified_controller:3.0:*:*:*:*:*:*:* |
= 3.0 | |
| NVD | synology | diskstation_managercpe:2.3:o:synology:diskstation_manager:6.2:*:*:*:*:*:*:* |
= 6.2 | |
| NVD | synology | skynas_firmwarecpe:2.3:o:synology:skynas_firmware:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | synology | vs960hd_firmwarecpe:2.3:o:synology:vs960hd_firmware:-:*:*:*:*:*:*:* |
(no version) | |
| NVD | beyondtrust | privilege_management_for_maccpe:2.3:a:beyondtrust:privilege_management_for_mac:*:*:*:*:*:*:*:* |
< 21.1.1 | 21.1.1 |
| NVD | beyondtrust | privilege_management_for_unix/linuxcpe:2.3:a:beyondtrust:privilege_management_for_unix\/linux:*:*:*:*:basic:*:*:* |
< 10.3.2-10 | 10.3.2-10 |
| NVD | oracle | micros_compact_workstation_3_firmwarecpe:2.3:o:oracle:micros_compact_workstation_3_firmware:310:*:*:*:*:*:*:* |
= 310 | |
| NVD | oracle | micros_es400_firmwarecpe:2.3:o:oracle:micros_es400_firmware:*:*:*:*:*:*:*:* |
>= 400, <= 410 | |
| NVD | oracle | micros_kitchen_display_system_firmwarecpe:2.3:o:oracle:micros_kitchen_display_system_firmware:210:*:*:*:*:*:*:* |
= 210 | |
| NVD | oracle | micros_workstation_5a_firmwarecpe:2.3:o:oracle:micros_workstation_5a_firmware:5a:*:*:*:*:*:*:* |
= 5a | |
| NVD | oracle | micros_workstation_6_firmwarecpe:2.3:o:oracle:micros_workstation_6_firmware:*:*:*:*:*:*:*:* |
>= 610, <= 655 | |
| NVD | oracle | communications_performance_intelligence_centercpe:2.3:a:oracle:communications_performance_intelligence_center:*:*:*:*:*:*:*:* |
>= 10.3.0.0.0, <= 10.3.0.2.1 | |
| NVD | oracle | communications_performance_intelligence_centercpe:2.3:a:oracle:communications_performance_intelligence_center:*:*:*:*:*:*:*:* |
>= 10.4.0.1.0, <= 10.4.0.3.1 | |
| NVD | oracle | tekelec_platform_distributioncpe:2.3:a:oracle:tekelec_platform_distribution:*:*:*:*:*:*:*:* |
>= 7.4.0, <= 7.7.1 |
References
- 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
- https://nvd.nist.gov/vuln/detail/CVE-2021-3156
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 26 Jan 2021)
- 25 Nov 2026 20:10 UTC · CISA KEV: first stored (published 6 Apr 2022)
- 6 Apr 2022 00:00 UTC · Listed as known exploited