CVE-2021-3156Sudo Heap Buffer Overflow
sudo - security update
Published Jan 26, 2021 · Updated Nov 3, 2026 · Also known as ALPINE-CVE-2021-3156, Baron Samedit, CLEANSTART-2025-XR32481, CLSA-2021-1611743864, CLSA-2021-1634925665, CLSA-2025-1748365696, DEBIAN-CVE-2021-3156, DLA-2534-1, DSA-4839-1, MGASA-2021-0056, SUSE-SU-2021:0928-1, SUSE-SU-2021:1267-1, SUSE-SU-2021:1273-1, SUSE-SU-2021:1274-1, SUSE-SU-2021:1275-1, SUSE-SU-2024:4389-1, Sudo Baron Samedit, TR-21-0077, TR-21-0700, TR-21-0960, TR-21-0961, UBUNTU-CVE-2021-3156, USN-4705-2, openSUSE-SU-2021:0602-1
Key Facts
Patch immediately- CVE-2021-3156 is a high-severity vulnerability (CVSS 7.8 v3.1) affecting Privilege Management For Mac (Beyondtrust), Privilege Management For Unix\/linux (Beyondtrust), Web Gateway (Mcafee) and 22 more products.
- It is exploited in the wild, listed in CISA KEV, Industry KEV feed, CIRCL KEV, ENISA EUVD since Apr 6, 2022. A public exploit is reported by tracking sources, but no code link is listed yet.
- EPSS estimates a 100% probability of exploitation in the next 30 days.
- Fixed versions are available, including Privilege Management For Mac 21.1.1, Privilege Management For Unix\/linux 10.3.2-10, Communications Performance Intelligence Center <=10.3.0.2.1.
- Brandefense priority: patch immediately, because it is listed as exploited in the wild.
Scores
CVSS v3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
100%
Higher than 99.9% of all scored CVEs
Exploit maturity
Exploited (KEV)
ATLAS score
83/100
Publication score, see How it works
Exploitation Verdict
KEV listed
Apr 6, 2022
435 days after publication
Federal due date
Apr 27, 2022
Overdue
Attributed actors
Exploit & Defence Guidance
Exploit maturity
Exploited (KEV)
Public exploit code
8
Proof-of-concept links
In-the-wild evidence
18
Reports of active use
Required action (CISA): Apply updates per vendor instructions.
Advisories And Exploit References
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2021-3156
- advisoryhttps://securityaffairs.co/wordpress/113900/hacking/sudo-vulnerability-cve-2021-3156.html?utm_source=rss&utm_medium=rss&utm_campaign=sudo-vulnerability-cve-2021-3156
- advisoryhttps://security.alpinelinux.org/vuln/CVE-2021-3156
- advisoryhttps://security-tracker.debian.org/tracker/CVE-2021-3156
- advisoryhttps://ubuntu.com/security/CVE-2021-3156
- advisoryhttps://www.cve.org/CVERecord?id=CVE-2021-3156
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.
Known-Exploited Catalog Listings
| Catalog | Added | Remediation due | Ransomware use |
|---|---|---|---|
| CISA KEV | Apr 6, 2022 | Apr 27, 2022 | Not reported |
| Industry KEV feed | Apr 6, 2022 | Apr 27, 2022 | Not reported |
| CIRCL KEV | Apr 6, 2022 | Apr 27, 2022 | Not reported |
| ENISA EUVD | Apr 6, 2022 | n/a | Not reported |
Required action: Apply updates per vendor instructions.
Affected Products
203 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| Privilege Management For MacBeyondtrust | See advisory | 21.1.1 |
| Privilege Management For Unix\/linuxBeyondtrust | See advisory | 10.3.2-10 |
| Web GatewayMcafee | 10.0.4, 8.2.17, 9.2.8 | n/a |
| Active Iq Unified ManagerNetapp | See advisory | n/a |
| Cloud BackupNetapp | See advisory | n/a |
Patched Releases
Privilege Management For Mac
21.1.1
Privilege Management For Unix\/linux
10.3.2-10
Communications Performance Intelligence Center
<=10.3.0.2.1
Micros Es400 Firmware
<=410
oracle micros workstation 6 firmware
<=655
Tekelec Platform Distribution
<=7.7.1
redhat-virtualization-host
0:4.3.13-20210127.0.el7_9, 0:4.4.4-20210201.0.el8_3
rootio-sudo
1.9.5p1-1.1
seal-sudo
1.8.23-10.el7_9.3+sp999
Sudo
0:1.8.23-4.el7_7.3, 0:1.8.25p1-8.el8_1.2, 0:1.8.6p3-29.el6_10.4, 1.8.10p3-10.29.1, 1.8.10p3-10.32.1, 1.8.10p3-10.35.1, 1.8.16-0ubuntu1.10, 1.8.19p1-2.1+deb9u3, 1.8.20p2-3.20.1, 1.8.20p2-3.23.1, 1.8.21p2-3ubuntu1.4, 1.8.22-4.15.1, 1.8.22-4.18.1, 1.8.22-lp151.5.12.1, 1.8.22-lp152.8.6.1, 1.8.22-lp152.8.9.1, 1.8.23-10.el7_9.1, 1.8.23-10.el7_9.3.tuxcare.els2, 1.8.23-10.el7_9.3+sp999, 1.8.23-4.amzn2.2.1, 1.8.23-9.56.amzn1, 1.8.27-1+deb10u3, 1.8.27-4.15.1, 1.8.27-4.51.1, 1.8.27-4.6.1, 1.8.29-6.el8_3.1, 1.8.31-1ubuntu1.2, 1.8.31-r1, 1.8.6p3-29.0.3.el6_10.3, 1.8.6p3-30.el6.cloudlinux.els6, 1.8.9p5-1ubuntu1.5+esm6, 1.9.2-3.oe1, 1.9.5_p2-r0, 1.9.5-2.ph1, 1.9.5-2.ph2, 1.9.5-2.ph3, 1.9.5.p2-1, 1.9.5p1-1.1, 1.9.5p2-1.mga7, 1.9.5p2-r0, 1.9.7p2-1.4, NA, 1.8.32
sudo-devel
1.8.22-4.15.1, 1.8.22-4.18.1, 1.8.22-lp151.5.12.1, 1.8.22-lp152.8.6.1, 1.8.22-lp152.8.9.1, 1.8.23-10.el7_9.1, 1.8.23-10.el7_9.3.tuxcare.els2, 1.8.23-4.amzn2.2.1, 1.8.23-9.56.amzn1, 1.8.27-4.15.1, 1.8.27-4.51.1, 1.8.27-4.6.1, 1.8.6p3-29.0.3.el6_10.3, 1.8.6p3-30.el6.cloudlinux.els6, 1.9.7p2-1.4
sudo-plugin-python
1.9.7p2-1.4
sudo-test
1.8.22-lp151.5.12.1, 1.8.22-lp152.8.6.1, 1.8.22-lp152.8.9.1, 1.9.7p2-1.4
Timeline
Publicly disclosed
Jan 26, 2021
Added to CISA KEV
Apr 6, 2022
Added to Industry KEV feed
Apr 6, 2022
Added to CIRCL KEV
Apr 6, 2022
Added to ENISA EUVD
Apr 6, 2022
Last updated
Nov 3, 2026
Weakness Type
- CWE-122 Heap-based Buffer Overflow
- CWE-193 Off-by-one Error
References
- advisorynvd.nist.gov · CVE-2021-3156
- advisorysecurityaffairs.co · CVE-2021-3156
- advisorysecurity.alpinelinux.org · CVE-2021-3156
- advisorysecurity-tracker.debian.org · CVE-2021-3156
- advisoryubuntu.com · CVE-2021-3156
FAQ
Common Questions.
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: Privilege Management For Mac (Beyondtrust); Privilege Management For Unix\/linux (Beyondtrust); Web Gateway (Mcafee) versions 10.0.4, 8.2.17, 9.2.8, among others. The full list is in the CVE brief.
It is exploited in the wild, listed in CISA KEV, Industry KEV feed, CIRCL KEV, ENISA EUVD since Apr 6, 2022.
Yes. It was added on Apr 6, 2022 with a federal remediation due date of Apr 27, 2022.
A public exploit is reported by tracking sources, but no code link is listed yet.
Fixed versions are available, including Privilege Management For Mac 21.1.1, Privilege Management For Unix\/linux 10.3.2-10, Communications Performance Intelligence Center <=10.3.0.2.1.
Brandefense priority: patch immediately, because it is listed as exploited in the wild.
Is CVE-2021-3156 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo