CVE-2021-3156

Known Exploited Public Exploit

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.

Category

7.8
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 92.35% Top 5%
KEV Since 
Vendor Advisory gentoo.org Vendor Advisory debian.org Vendor Advisory fedoraproject.org Vendor Advisory fedoraproject.org Vendor Advisory cisco.com
Affected: n/a n/a
Published at:
Updated at:

References

Link Tags
https://lists.debian.org/debian-lts-announce/2021/01/msg00022.html third party advisory mailing list
http://seclists.org/fulldisclosure/2021/Jan/79 mailing list exploit third party advisory
http://www.openwall.com/lists/oss-security/2021/01/26/3 mailing list exploit 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 third party advisory mailing list
http://www.openwall.com/lists/oss-security/2021/01/27/2 third party advisory mailing list
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 third party advisory mailing list
http://www.openwall.com/lists/oss-security/2021/02/15/1 mailing list exploit third party advisory
https://www.oracle.com//security-alerts/cpujul2021.html third party advisory patch
https://www.sudo.ws/stable.html#1.9.5p2 release notes
https://www.openwall.com/lists/oss-security/2021/01/26/3 mailing list exploit third party advisory
http://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html exploit vdb entry third party advisory
https://security.netapp.com/advisory/ntap-20210128-0002/ third party advisory
https://security.netapp.com/advisory/ntap-20210128-0001/ third party advisory
http://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html exploit vdb entry third party advisory
http://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html exploit vdb entry third party advisory
http://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html exploit vdb entry third party advisory
https://support.apple.com/kb/HT212177 third party advisory
https://kc.mcafee.com/corporate/index?page=content&id=SB10348 third party advisory broken link
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 third party advisory patch
https://www.oracle.com/security-alerts/cpuoct2021.html third party advisory patch
https://www.oracle.com/security-alerts/cpuapr2022.html third party advisory patch
http://www.openwall.com/lists/oss-security/2024/01/30/8 mailing list
http://www.openwall.com/lists/oss-security/2024/01/30/6 mailing list exploit
http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html exploit vdb entry third party advisory
http://seclists.org/fulldisclosure/2024/Feb/3 mailing list exploit third party advisory
https://www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156 third party advisory exploit

Frequently Asked Questions

What is the severity of CVE-2021-3156?
CVE-2021-3156 has been scored as a high severity vulnerability.
How to fix CVE-2021-3156?
To fix CVE-2021-3156, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-3156 being actively exploited in the wild?
It is confirmed that CVE-2021-3156 is actively exploited. Be extra cautious if you are using vulnerable components. According to its EPSS score, there is a ~92% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.