Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🛡️
CISA KEV · ACTIVELY EXPLOITED
HIGH severity

CVE-2021-3156 — sudo

HIGH

CVE-2021-3156 is a high-severity (CVSS 7.8) CWE-193 vulnerability. It is in CISA's Known Exploited Vulnerabilities catalog (added 2022-04-06) — treat it as actively exploited and patch now. A fix is available — see the affected versions and patch details below.

Published
Updated
Affected
24 products
Patched
See advisory
Exploits
83 known
Exploitation data as of Oct 22, 2026 · OSV.dev, NVD, CISA KEV, FIRST.org (EPSS)

Exploitation Status

Actively exploited in the wild

  • Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2022-04-06. Federal agencies were required to remediate by 2022-04-27.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2021-3156.

EPSS Exploitation Probability

via FIRST.org ↗
100.0%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk
90.2%93.5%96.7%100.0%92.5%100.0%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-3156 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.

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.

Affected Products

24 products · 32 configurations
Application
privilege management for macbeyondtrust
< 21.1.1
range
Application
privilege management for unix\/linuxbeyondtrust
< 10.3.2-10
range
OS
debian linuxdebian
2 versions
9.010.0
OS
fedorafedoraproject
2 versions
3233
Application
web gatewaymcafee
3 versions
8.2.179.2.810.0.4
Application
active iq unified managernetapp
all
Exploits & PoCs
83

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

EDB-49522localmultiple

Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (2)

by nu11secur1ty · Feb 3, 2021

EDB-49521localmultiple

Sudo 1.9.5p1 - 'Baron Samedit ' Heap-Based Buffer Overflow Privilege Escalation (1)

by West Shepherd · Feb 3, 2021

Detection & mitigation playbook

Vulnerability
  1. Detect

    Identify every host running the affected component and compare the installed build against the fixed version below — for source-built or distro-packaged software the version string, not a lockfile, is the source of truth (`dpkg -l`, `rpm -q`, or the binary's own `--version`).

  2. Fix

    Upgrade the affected component to the fixed release for CVE-2021-3156, or apply your distribution's backported patch — distro builds are often patched at an older version number, so check your vendor's advisory rather than the upstream version alone.

  3. Workarounds

    Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This flaw does not affect the versions of sudo shipped with Red Hat Enterprise Linux 5, because the vulnerable code was not present in these versions.

Workaround published by Red Hat
Red Hat Product Security strongly recommends customers to update to fixed sudo packages once they are available. For customers who cannot update immediately, the following interim partial mitigation using systemtap is suggested: 1. Install required systemtap packages and dependencies: ``` systemtap yum-utils kernel-devel-"$(uname -r)" ``` Then for RHEL 7 install kernel debuginfo, using: ``` debuginfo-install -y kernel-"$(uname -r)" ``` Then for RHEL 8 & 6 install sudo debuginfo, using: ``` debuginfo-install sudo ``` 2. Create the following systemtap script: (call the file as sudoedit-block.stap) ``` probe process("/usr/bin/sudo").function("main") { command = cmdline_args(0,0,""); if…
Source: Red Hat security advisory for CVE-2021-3156 (CC BY 4.0)
ProductFixed inAdvisory
Red Hat Enterprise Linux 6 Extended Lifecycle Supportsudo-0:1.8.6p3-29.el6_10.4RHSA-2021:0227
Red Hat Enterprise Linux 7sudo-0:1.8.23-10.el7_9.1RHSA-2021:0221
Red Hat Enterprise Linux 7.2 Advanced Update Supportsudo-0:1.8.6p7-17.el7_2.3RHSA-2021:0226
Red Hat Enterprise Linux 7.3 Advanced Update Supportsudo-0:1.8.6p7-23.el7_3.3RHSA-2021:0225
Red Hat Enterprise Linux 7.4 Advanced Update Supportsudo-0:1.8.19p2-12.el7_4.2RHSA-2021:0224
Red Hat Enterprise Linux 7.6 Extended Update Supportsudo-0:1.8.23-3.el7_6.2RHSA-2021:0223
Red Hat Enterprise Linux 7.7 Extended Update Supportsudo-0:1.8.23-4.el7_7.3RHSA-2021:0222
Red Hat Enterprise Linux 8sudo-0:1.8.29-6.el8_3.1RHSA-2021:0218

Frequently Asked 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.
O3 Security · Impact-Aware SCA

Is CVE-2021-3156 in your dependencies?

Find it across , including transitive dependencies.

Actively Exploited: CVE-2021-3156: sudo PrivEsc (High 7.8)