CVE-2021-3156: Sudo Heap-Based Buffer Overflow Vulnerability HIGH 7.8 EXPLOITED WATCHLIST UPGRADE MITIGATE MITIGATE
CVE-2021-3156 is a high-severity flaw (CVSS 7.8) affecting sudo, fedora, debian linux, reported as exploited in the wild. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority High severity EPSS top 1%: very likely to be exploited Exploited in the wild (CISA KEV) Public exploit reference On your watchlist A fixed release or distro patch exists.
Risk facts CVSS score 7.8 (High) Attack vector Local Attack complexity Low Privileges needed Low User interaction None EPSS exploit chance 100.0% (top 1%) CISA exploited list Yes, fix due 2022-04-27 Weakness CWE-193 Published 2021-01-26 Last modified 2026-06-17
Share: LinkedIn · X · Reddit
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Timeline 2021-01-26 21:15 UTC Published CVE record published2022-04-06 Exploited Added to the CISA Known Exploited Vulnerabilities list2022-04-27 Deadline CISA due date for US federal agencies to patch2026-06-17 04:04 UTC Updated Record last modifiedsudo project sudo UPGRADE
Affected: >= 1.8.2 and < 1.8.32 · >= 1.9.0 and < 1.9.5 · 1.9.5 · 1.9.5 patch1
Fixed in: 1.8.32, 1.9.5
Safe to downgrade to: no unaffected older release
1. Check installed version
Copy apt-cache policy sudo || rpm -q sudo || sudo --version
2. UPGRADE to 1.8.32 (Debian / Ubuntu)
Copy sudo apt update && sudo apt install --only-upgrade sudo
2. UPGRADE (RHEL / Amazon Linux / Fedora)
Copy sudo dnf upgrade sudo
Note
Copy Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
fedoraproject fedora MITIGATE
Affected: 32 · 33
Fixed in: no fixed release known
Safe to downgrade to: a release before 32
Check your OS release
Copy cat /etc/os-release; uname -r
Debian / Ubuntu
Copy sudo apt update && sudo apt full-upgrade
RHEL / Amazon Linux / Fedora
Copy sudo dnf upgrade --refresh
Windows
Copy Install the latest cumulative update from Windows Update
If no patch exists yet
Copy OS downgrades are not safe. Apply the vendor mitigation from the advisory and restrict exposure.
debian debian linux MITIGATE
Affected: 9.0 · 10.0
Fixed in: no fixed release known
Safe to downgrade to: a release before 9.0
Check your OS release
Copy cat /etc/os-release; uname -r
Debian / Ubuntu
Copy sudo apt update && sudo apt full-upgrade
RHEL / Amazon Linux / Fedora
Copy sudo dnf upgrade --refresh
Windows
Copy Install the latest cumulative update from Windows Update
If no patch exists yet
Copy OS downgrades are not safe. Apply the vendor mitigation from the advisory and restrict exposure.
netapp active iq unified manager MITIGATE
Affected: all versions
Fixed in: no fixed release known
Safe to downgrade to: no unaffected older release
1. Check installed version
Copy apt-cache policy active-iq-unified-manager || rpm -q active-iq-unified-manager || active-iq-unified-manager --version
No fixed or unaffected release known
Copy Apply the vendor mitigation from the advisory, disable the affected feature, or restrict network access.
netapp cloud backup MITIGATE
Affected: all versions
Fixed in: no fixed release known
Safe to downgrade to: no unaffected older release
1. Check installed version
Copy apt-cache policy cloud-backup || rpm -q cloud-backup || cloud-backup --version
No fixed or unaffected release known
Copy Apply the vendor mitigation from the advisory, disable the affected feature, or restrict network access.
netapp hci management node MITIGATE
Affected: all versions
Fixed in: no fixed release known
Safe to downgrade to: no unaffected older release
1. Check installed version
Copy apt-cache policy hci-management-node || rpm -q hci-management-node || hci-management-node --version
No fixed or unaffected release known
Copy Apply the vendor mitigation from the advisory, disable the affected feature, or restrict network access.
Exact fixes by distribution Show all
A distro patch exists: prefer upgrading over downgrading.
Fedora 46 · feh ·
FIXED · 3.13.1-1.fc46 · FEDORA-2026-3c76a13a4f ·
source Copy sudo dnf upgrade --advisory=FEDORA-2026-3c76a13a4f
Fedora ELN · setroubleshoot ·
FIXED · 3.3.37-7.eln159 · FEDORA-2026-f81b122fe1 ·
source Copy sudo dnf upgrade --advisory=FEDORA-2026-f81b122fe1
Ubuntu 20.04 · sudo · FIXED · 1.8.31-1ubuntu1.2
Copy sudo apt update && sudo apt install --only-upgrade sudo
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' sudo)" ge "1.8.31-1ubuntu1.2" && echo PATCHED || echo STILL-VULNERABLE
Debian 12 · sudo · FIXED · 1.9.5p1-1.1
Copy sudo apt update && sudo apt install --only-upgrade sudo
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' sudo)" ge "1.9.5p1-1.1" && echo PATCHED || echo STILL-VULNERABLE
Debian 13 · sudo · FIXED · 1.9.5p1-1.1
Copy sudo apt update && sudo apt install --only-upgrade sudo
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' sudo)" ge "1.9.5p1-1.1" && echo PATCHED || echo STILL-VULNERABLE
RHEL 6 Extended Lifecycle Support · sudo · FIXED · sudo-1.8.6p3-29.el6_10.4
Copy sudo dnf upgrade --advisory=RHSA-2021:0227
rpm -q sudo
RHEL 7 · sudo · FIXED · sudo-1.8.23-10.el7_9.1
Copy sudo dnf upgrade --advisory=RHSA-2021:0221
rpm -q sudo
RHEL 7.2 Advanced Update Support · sudo · FIXED · sudo-1.8.6p7-17.el7_2.3
Copy sudo dnf upgrade --advisory=RHSA-2021:0226
rpm -q sudo
RHEL 7.3 Advanced Update Support · sudo · FIXED · sudo-1.8.6p7-23.el7_3.3
Copy sudo dnf upgrade --advisory=RHSA-2021:0225
rpm -q sudo
RHEL 7.4 Advanced Update Support · sudo · FIXED · sudo-1.8.19p2-12.el7_4.2
Copy sudo dnf upgrade --advisory=RHSA-2021:0224
rpm -q sudo
Alpine 3.20 · sudo · FIXED · sudo-1.9.5_p2-r0
Copy apk add --upgrade sudo
apk info -v sudo
Alpine 3.21 · sudo · FIXED · sudo-1.9.5_p2-r0
Copy apk add --upgrade sudo
apk info -v sudo
Alpine 3.22 · sudo · FIXED · sudo-1.9.5_p2-r0
Copy apk add --upgrade sudo
apk info -v sudo
Alpine 3.23 · sudo · FIXED · sudo-1.9.5_p2-r0
Copy apk add --upgrade sudo
apk info -v sudo
Copy sudo yum update --advisory=ALAS2-2021-1590
Copy sudo yum update --advisory=ALAS-2021-1478
Public exploits and detection Public code exists for this CVE. Treat unpatched systems as at risk, and only run PoCs in a lab.
Quick answers How do I fix CVE-2021-3156? sudo: upgrade to 1.8.32, 1.9.5; fedora: mitigate or apply the listed mitigation; debian linux: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2021-3156 being exploited? Yes. CVE-2021-3156 is on the CISA Known Exploited Vulnerabilities list, so treat it as patch-now.
What does CVE-2021-3156 affect? CVE-2021-3156 affects sudo, fedora, debian linux. Severity is high (CVSS 7.8). 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.
How urgent is CVE-2021-3156? Priority 87/100. High severity; EPSS top 1%: very likely to be exploited; Exploited in the wild (CISA KEV); Public exploit reference; On your watchlist
Software pages Debian vulnerabilities · Sudo vulnerabilities
Related CVEs CVE-2026-35535 HIGH 7.4 UPGRADE UPGRADE In Sudo through 1.9.17p2 before 3e474c2, a failure of a setuid, setgid, or setgroups call, during a privilege CVE-2025-32462 LOW 2.8 UPGRADE Sudo before 1.9.17p1, when used with a sudoers file that specifies a host that is neither the current host norCVE-2025-46718 LOW 3.3 UPGRADE sudo-rs is a memory safe implementation of sudo and su written in RustCVE-2025-46717 LOW 3.3 UPGRADE sudo-rs is a memory safe implementation of sudo and su written in RustCVE-2025-32463 CRITICAL 9.3 EXPLOITED UPGRADE MITIGATE Sudo Inclusion of Functionality from Untrusted Control Sphere VulnerabilityReferences ← Back to latest CVEs