CVE-2021-3156
NVD
Vulnerability Summary
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.
Affected & Patched Versions
- n/a
No patched version published yet
Until a fix ships, reduce exposure:
- Restrict access to the affected service or interface to trusted networks.
- Disable the affected feature if you do not need it.
- Watch the vendor advisory for a firmware or software update.
What to do
Patch now. CISA lists this flaw as exploited in the wild and set a federal remediation deadline of Apr 27, 2022.
- Check whether you run n/a and which version.
- No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
- Subscribe to the vendor advisory so you learn when a fix ships.
- Review logs and exposed services for signs of earlier compromise.
CISA required action: Apply updates per vendor instructions.
CISA KEV Status
Listed in Known Exploited Vulnerabilities
Added: Apr 6, 2022
Remediation due: Apr 27, 2022 (deadline passed)
Remediation due: Apr 27, 2022 (deadline passed)
Timeline
- Jan 26, 2021Published
- Apr 6, 2022Added to CISA KEV catalog
- Apr 27, 2022KEV remediation due date
- Oct 21, 2025Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new n/a CVEsYou are reading CVE-2021-3156. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
- Referencehttps://lists.debian.org/debian-lts-announce/2021/01/msg00022.html
- Advisoryhttp://seclists.org/fulldisclosure/2021/Jan/79
- Advisoryhttp://www.openwall.com/lists/oss-security/2021/01/26/3
- Referencehttps://security.gentoo.org/glsa/202101-33
- Vendor Advisoryhttps://www.debian.org/security/2021/dsa-4839
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/
- Referencehttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/
- Advisoryhttp://www.openwall.com/lists/oss-security/2021/01/27/1
- Advisoryhttp://www.openwall.com/lists/oss-security/2021/01/27/2
- Vendor Advisoryhttps://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM
- Advisoryhttps://www.kb.cert.org/vuls/id/794544
- Advisoryhttp://seclists.org/fulldisclosure/2021/Feb/42
- Advisoryhttp://www.openwall.com/lists/oss-security/2021/02/15/1
- Referencehttps://www.oracle.com//security-alerts/cpujul2021.html
- Referencehttps://www.sudo.ws/stable.html#1.9.5p2
- Advisoryhttps://www.openwall.com/lists/oss-security/2021/01/26/3
- Exploithttp://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html
- Vendor Advisoryhttps://security.netapp.com/advisory/ntap-20210128-0002/
- Vendor Advisoryhttps://security.netapp.com/advisory/ntap-20210128-0001/
- Exploithttp://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html
- Exploithttp://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html
- Exploithttp://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html
- Referencehttps://support.apple.com/kb/HT212177
- Referencehttps://kc.mcafee.com/corporate/index?page=content&id=SB10348
- Vendor Advisoryhttps://www.beyondtrust.com/blog/entry/security-advisory-privilege-management-for-unix-linux-pmul-basic-and-privilege-management-for-mac-pmm-affected-by-sudo-vulnerability
- Vendor Advisoryhttps://www.synology.com/security/advisory/Synology_SA_21_02
- Advisoryhttp://www.openwall.com/lists/oss-security/2021/09/14/2
- Referencehttps://www.oracle.com/security-alerts/cpuoct2021.html
- Referencehttps://www.oracle.com/security-alerts/cpuapr2022.html
- Advisoryhttp://www.openwall.com/lists/oss-security/2024/01/30/8
- Advisoryhttp://www.openwall.com/lists/oss-security/2024/01/30/6
- Exploithttp://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html
- Advisoryhttp://seclists.org/fulldisclosure/2024/Feb/3
- Referencehttps://www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156
Data last checked: Dec 1, 2026 06:11 UTC