CVE-2021-3156Sudo Heap-Based Buffer Overflow Vulnerability
CVSS score
7.8
High
CVSS 3.1 from NVD
Exploit probability (EPSS)
100.0%
100.0% chance of exploitation in the next 30 days, higher than 100.0% of all CVEs.
CISA KEV
Actively exploited
Added to KEV on 6 Apr 2022.
US federal deadline to fix: 27 Apr 2022.
Official 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.
Source: NVD · CNA: cve@mitre.org
How to fix it, step by step
Treat it as urgent
Attackers are already exploiting this flaw: CISA added it to its Known Exploited Vulnerabilities list on 6 Apr 2022.
US federal agencies must fix it by 27 Apr 2022. It's a sensible deadline for everyone else too.
CISA's full instruction
Apply updates per vendor instructions.
Check whether you're affected
Find every system running Sudo, fedoraproject Fedora, Debian Linux, netapp Active Iq Unified Manager, netapp Cloud Backup and compare its version with the affected versions.
Update to a fixed version
- Update Sudo to 1.8.32, 1.9.5 or later, on the branch you run.
- Update Privilege Management For Mac to 21.1.1 or later.
- Update Privilege Management For Unix/linux to 10.3.2-10 or later.
If you can't update right away
Apply the workaround or mitigation in the vendor's advisory until you can update:
Check for signs of compromise
Updating closes the flaw but doesn't remove an attacker who got in earlier. Review affected systems for unknown accounts, unusual logins and configuration changes, and use any indicators of compromise the vendor or CISA publish.
Confirm the fix
Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.
Was this useful?
How it can be exploited
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Values in red make the vulnerability easier to exploit or more damaging. CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected products
| Affected products | Versions |
|---|---|
| Sudo Sudo | ≥ 1.8.2, < 1.8.32 · ≥ 1.9.0, < 1.9.5 · 1.9.5 |
| fedoraproject Fedora | 32 · 33 |
| Debian Debian Linux | 9.0 · 10.0 |
| netapp Active Iq Unified Manager | Not specified |
| netapp Cloud Backup | Not specified |
| netapp Hci Management Node | Not specified |
| netapp Oncommand Unified Manager Core Package | Not specified |
| netapp Ontap Select Deploy Administration Utility | Not specified |
| netapp Ontap Tools | 9 |
| netapp Solidfire | Not specified |
| 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 | Not specified |
| Synology Vs960hd Firmware | Not specified |
| BeyondTrust Privilege Management For Mac | < 21.1.1 |
| BeyondTrust Privilege Management For Unix/linux | < 10.3.2-10 |
| Oracle Micros Compact Workstation 3 Firmware | 310 |
| Oracle Micros Es400 Firmware | ≥ 400, ≤ 410 |
| Oracle Micros Kitchen Display System Firmware | 210 |
| Oracle Micros Workstation 5a Firmware | 5a |
| Oracle Micros Workstation 6 Firmware | ≥ 610, ≤ 655 |
| Oracle Communications Performance Intelligence Center | ≥ 10.3.0.0.0, ≤ 10.3.0.2.1 · ≥ 10.4.0.1.0, ≤ 10.4.0.3.1 |
| Oracle Tekelec Platform Distribution | ≥ 7.4.0, ≤ 7.7.1 |
Weakness
Timeline
- Published:
- Added to CISA KEV:
- Last modified:
Frequently asked questions
Is CVE-2021-3156 being exploited?
Yes. CISA added CVE-2021-3156 to its Known Exploited Vulnerabilities catalog on 6 Apr 2022, which means there is evidence of exploitation in the wild. Its EPSS score estimates a 100.0% probability of exploitation in the next 30 days.
What is the CVSS score of CVE-2021-3156?
CVE-2021-3156 has a CVSS 3.1 base score of 7.8 (high).
Which versions are affected?
Sudo Sudo (≥ 1.8.2, < 1.8.32; ≥ 1.9.0, < 1.9.5; 1.9.5), Fedoraproject Fedora (32; 33), Debian Debian Linux (9.0; 10.0), Netapp Active Iq Unified Manager, Netapp Cloud Backup, Netapp Hci Management Node
Is there a patch for CVE-2021-3156?
The official record links to vendor advisories or patches; see “What to do” above.
References
- www.openwall.com/lists/oss-security/2021/09/14/2(Mailing List, Patch, Third Party Advisory)
- www.oracle.com//security-alerts/cpujul2021.html(Patch, Third Party Advisory)
- www.oracle.com/security-alerts/cpuapr2022.html(Patch, Third Party Advisory)
- www.oracle.com/security-alerts/cpuoct2021.html(Patch, Third Party Advisory)
- packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html(Exploit, Third Party Advisory, VDB Entry)
- packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html(Exploit, Third Party Advisory, VDB Entry)
- packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html(Exploit, Third Party Advisory, VDB Entry)
- packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html(Exploit, Third Party Advisory, VDB Entry)
- packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html(Exploit, Third Party Advisory, VDB Entry)
- seclists.org/fulldisclosure/2021/Jan/79(Exploit, Mailing List, Third Party Advisory)
- seclists.org/fulldisclosure/2024/Feb/3(Exploit, Mailing List, Third Party Advisory)
- www.openwall.com/lists/oss-security/2021/01/26/3(Exploit, Mailing List, Third Party Advisory)
- www.openwall.com/lists/oss-security/2021/02/15/1(Exploit, Mailing List, Third Party Advisory)
- www.openwall.com/lists/oss-security/2024/01/30/6(Exploit, Mailing List)
- www.openwall.com/lists/oss-security/2021/01/26/3(Exploit, Mailing List, Third Party Advisory)
- www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156(Exploit, Third Party Advisory)
- seclists.org/fulldisclosure/2021/Feb/42(Mailing List, Third Party Advisory)
- www.openwall.com/lists/oss-security/2021/01/27/1(Mailing List, Third Party Advisory)
- www.openwall.com/lists/oss-security/2021/01/27/2(Mailing List, Third Party Advisory)
- www.openwall.com/lists/oss-security/2024/01/30/8(Mailing List)
Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.