# CVE-2021-3156 (Baron Samedit)

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.

- Page: https://www.vulneraibility.com/cve/CVE-2021-3156
- CVSS: 7.8
- Known exploited: yes, in CISA KEV since 2022-04-06; CISA due date 2022-04-27
- EPSS: 99.96% (percentile 100.0)
- Public exploit code: 2 on Exploit-DB · 1 Metasploit module · 90 GitHub proofs of concept (first 2021-01-26)
- CISA SSVC: exploitation active, automatable no, technical impact total (assessed 2025-02-03)
- Weakness: CWE-193
- Published: 2021-01-26

## Affected

- sudo_project:sudo
- fedoraproject:fedora
- debian:debian_linux
- netapp:active_iq_unified_manager
- netapp:cloud_backup
- netapp:hci_management_node
- netapp:oncommand_unified_manager_core_package
- netapp:ontap_select_deploy_administration_utility
- netapp:ontap_tools
- netapp:solidfire
- mcafee:web_gateway
- synology:diskstation_manager_unified_controller
- synology:diskstation_manager
- synology:skynas_firmware
- synology:vs960hd_firmware
- beyondtrust:privilege_management_for_mac
- beyondtrust:privilege_management_for_unix\/linux
- oracle:micros_compact_workstation_3_firmware
- oracle:micros_es400_firmware
- oracle:micros_kitchen_display_system_firmware
- oracle:micros_workstation_5a_firmware
- oracle:micros_workstation_6_firmware
- oracle:communications_performance_intelligence_center
- oracle:tekelec_platform_distribution

## References

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

---
Summary, impact and action are written by the vulneraibility.com AI analysis pipeline from the CVE record, NVD, CISA and FIRST data; verify against the references.
