CVE-2021-3156
Sudo Heap-Based Buffer Overflow Vulnerability
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.
Description as published by the source, in English.
Key facts
- Published
- 2021-01-26
- Last modified
- 2026-06-17
- Assigned by
- cve@mitre.org
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Scored by
- nvd@nist.gov (NVD Primary)
- Probability of exploitation
-
99.3 %
among the highest of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Yes, see references
Actively exploited
CISA added this vulnerability to the Known Exploited Vulnerabilities catalogue on 2022-04-06, with a remediation deadline of 2022-04-27 for US federal agencies.
Required action: Apply updates per vendor instructions.
Affected products
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Beyondtrust | Privilege Management For Mac | < 21.1.1 | Affected |
| Beyondtrust | Privilege Management For Unix/linux | < 10.3.2-10 | Affected |
| Debian | Debian Linux | 10.0 | Affected |
| Debian | Debian Linux | 9.0 | Affected |
| Fedoraproject | Fedora | 32 | Affected |
| Fedoraproject | Fedora | 33 | Affected |
| Mcafee | Web Gateway | 10.0.4 | Affected |
| Mcafee | Web Gateway | 8.2.17 | Affected |
| Mcafee | Web Gateway | 9.2.8 | Affected |
| Netapp | Active Iq Unified Manager | all versions listed | Affected |
| Netapp | Cloud Backup | all versions listed | Affected |
| Netapp | Hci Management Node | all versions listed | Affected |
| Netapp | Oncommand Unified Manager Core Package | all versions listed | Affected |
| Netapp | Ontap Select Deploy Administration Utility | all versions listed | Affected |
| Netapp | Ontap Tools | 9 | Affected |
| Netapp | Solidfire | all versions listed | Affected |
| Oracle | Communications Performance Intelligence Center | ≥ 10.3.0.0.0, ≤ 10.3.0.2.1 | Affected |
| Oracle | Communications Performance Intelligence Center | ≥ 10.4.0.1.0, ≤ 10.4.0.3.1 | Affected |
| Oracle | Micros Compact Workstation 3 | all versions listed | Not affected |
| Oracle | Micros Compact Workstation 3 Firmware | 310 | Affected |
| Oracle | Micros Es400 | all versions listed | Not affected |
| Oracle | Micros Es400 Firmware | ≥ 400, ≤ 410 | Affected |
| Oracle | Micros Kitchen Display System | all versions listed | Not affected |
| Oracle | Micros Kitchen Display System Firmware | 210 | Affected |
| Oracle | Micros Workstation 5a | all versions listed | Not affected |
| Oracle | Micros Workstation 5a Firmware | 5a | Affected |
| Oracle | Micros Workstation 6 | all versions listed | Not affected |
| Oracle | Micros Workstation 6 Firmware | ≥ 610, ≤ 655 | Affected |
| Oracle | Tekelec Platform Distribution | ≥ 7.4.0, ≤ 7.7.1 | Affected |
| Sudo Project | Sudo | 1.9.5 | Affected |
| Sudo Project | Sudo | ≥ 1.8.2, < 1.8.32 | Affected |
| Sudo Project | Sudo | ≥ 1.9.0, < 1.9.5 | Affected |
| Synology | Diskstation Manager | 6.2 | Affected |
| Synology | Diskstation Manager Unified Controller | 3.0 | Affected |
| Synology | Skynas | all versions listed | Not affected |
| Synology | Skynas Firmware | all versions listed | Affected |
| Synology | Vs960hd | all versions listed | Not affected |
| Synology | Vs960hd Firmware | all versions listed | Affected |
Weakness type
-
CWE-122: Heap-based Buffer Overflow
The product writes past the end of a buffer that was allocated on the heap.
-
CWE-193: Off-by-one Error
A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
References
- http://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html
- http://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html
- http://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escala…
- http://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html
- http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html
- http://seclists.org/fulldisclosure/2021/Feb/42
- http://seclists.org/fulldisclosure/2021/Jan/79
- http://seclists.org/fulldisclosure/2024/Feb/3
- http://www.openwall.com/lists/oss-security/2021/01/26/3
- http://www.openwall.com/lists/oss-security/2021/01/27/1
- http://www.openwall.com/lists/oss-security/2021/01/27/2
- http://www.openwall.com/lists/oss-security/2021/02/15/1
- http://www.openwall.com/lists/oss-security/2021/09/14/2
- http://www.openwall.com/lists/oss-security/2024/01/30/6
- http://www.openwall.com/lists/oss-security/2024/01/30/8
- https://kc.mcafee.com/corporate/index?page=content&id=SB10348
- https://lists.debian.org/debian-lts-announce/2021/01/msg00022.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/…
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/…
- https://security.gentoo.org/glsa/202101-33
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.