Skip to content
Noroxi
NVD / CVE Program· CNA mitre

CVE-2021-3156: 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

Noroxi assessment

Priority: Now (action score 91/100)

  • CISA has confirmed exploitation in the wild (Apr 6, 2022). Remediation deadline for US federal agencies: Apr 27, 2022.
  • A ready-made attack module is public (Metasploit, Nuclei); exploiting it takes no special expertise.
  • Probability of exploitation in the next 30 days: 99.9% (FIRST EPSS); higher than 99.9% of all records.
  • Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: sudo (Alpine:v3.10) 1.9.5p2-r0; sudo (Alpine:v3.11) 1.8.31-r1; sudo (Debian:10) 1.8.27-1+deb10u3.
  • Mentioned 6 times in Turkish national cyber security advisories (siberguvenlik.gov.tr).

Patch today or shut off access. Upgrade to sudo (Alpine:v3.10) 1.9.5p2-r0; sudo (Alpine:v3.11) 1.8.31-r1; sudo (Debian:10) 1.8.27-1+deb10u3 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · CISA KEV · FIRST EPSS

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.

HighCVSS 7.8 · v3.1KEVWeaponized Fix available
Published
Jan 26, 2021
Updated
Jun 17, 2026
EPSS
99.9% · 99th percentile

Report tools

JSON

Action score

91

Now

Patch today or shut off access.

CVSS
31 / 40 · 7.8 / 10
CISA KEV
30 / 30 · Listed
EPSS
30 / 30 · 99.9%

CISA SSVC decision

Exploitation
active
Automatable
no
Technical impact
total

Vulnrichment: CISA's decision-tree inputs.

Actively exploited in the wild

CISA added this to its Known Exploited Vulnerabilities catalog on Apr 6, 2022. That signals real attacks, not theory.

Remediation deadline for US federal agencies: Apr 27, 2022.

Get told when this record changes

  • In CISA KEV: exploitation in the wild confirmed
  • Weaponized exploit exists
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2021-3156

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits instantly.

Your free account also gets you

Running WordPress? Scan your site free with WP Lens

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Running WordPress? Scan your site free with WP Lens

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
sudo projectsudo
netappcloud backup
fedoraprojectfedora
debiandebian linux
netappactive iq unified manager
netapphci management node
netapponcommand unified manager core package
netappontap select deploy administration utility
netappontap tools
netappsolidfire
mcafeeweb gateway
synologydiskstation manager unified controller

and 19 more

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • beyondtrust privilege management for macbefore 21.1.1
  • beyondtrust privilege management for unix/linuxbefore 10.3.2-10
  • debian debian linux10.0
  • debian debian linux9.0
  • fedoraproject fedora32
  • fedoraproject fedora33
  • mcafee web gateway10.0.4
  • mcafee web gateway8.2.17
  • mcafee web gateway9.2.8
  • netapp active iq unified managerall versions
  • netapp cloud backupall versions
  • netapp hci management nodeall versions
  • netapp oncommand unified manager core packageall versions
  • netapp ontap select deploy administration utilityall versions
  • netapp ontap tools9
  • netapp solidfireall versions
  • oracle communications performance intelligence center10.4.0.1.0 and later · up to 10.4.0.3.1 inclusive
  • oracle communications performance intelligence center10.3.0.0.0 and later · up to 10.3.0.2.1 inclusive
  • oracle micros compact workstation 3 firmware310
  • oracle micros es400 firmware400 and later · up to 410 inclusive

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Alpine:v3.10sudofrom 1.8.2 · before 1.9.5p2-r01.9.5p2-r0
Alpine:v3.11sudofrom 1.8.2 · before 1.8.31-r11.8.31-r1
Debian:10sudobefore 1.8.27-1+deb10u31.8.27-1+deb10u3
Debian:12sudobefore 1.9.5p1-1.11.9.5p1-1.1
Debian:9sudobefore 1.8.19p1-2.1+deb9u31.8.19p1-2.1+deb9u3
openSUSE:Leap 15.1sudobefore 1.8.22-lp151.5.12.11.8.22-lp151.5.12.1
openSUSE:Leap 15.2sudobefore 1.8.22-lp152.8.9.11.8.22-lp152.8.9.1
openSUSE:Leap 15.2sudobefore 1.8.22-lp152.8.6.11.8.22-lp152.8.6.1
openSUSE:Tumbleweedsudobefore 1.9.7p2-1.41.9.7p2-1.4
Red Hat:enterprise_linux:7::clientsudobefore 0:1.8.23-10.el7_9.10:1.8.23-10.el7_9.1
Red Hat:enterprise_linux:7::clientsudo-debuginfobefore 0:1.8.23-10.el7_9.10:1.8.23-10.el7_9.1
Red Hat:enterprise_linux:7::clientsudo-develbefore 0:1.8.23-10.el7_9.10:1.8.23-10.el7_9.1
Red Hat:enterprise_linux:7::hypervisorredhat-virtualization-hostbefore 0:4.3.13-20210127.0.el7_90:4.3.13-20210127.0.el7_9
Red Hat:enterprise_linux:7::hypervisorredhat-virtualization-host-image-updatebefore 0:4.3.13-20210127.0.el7_90:4.3.13-20210127.0.el7_9
Red Hat:enterprise_linux:8::baseossudobefore 0:1.8.29-6.el8_3.10:1.8.29-6.el8_3.1
Red Hat:enterprise_linux:8::baseossudo-debuginfobefore 0:1.8.29-6.el8_3.10:1.8.29-6.el8_3.1
Red Hat:enterprise_linux:8::baseossudo-debugsourcebefore 0:1.8.29-6.el8_3.10:1.8.29-6.el8_3.1
Red Hat:rhel_aus:7.2::serversudobefore 0:1.8.6p7-17.el7_2.30:1.8.6p7-17.el7_2.3
Red Hat:rhel_aus:7.2::serversudo-debuginfobefore 0:1.8.6p7-17.el7_2.30:1.8.6p7-17.el7_2.3
Red Hat:rhel_aus:7.2::serversudo-develbefore 0:1.8.6p7-17.el7_2.30:1.8.6p7-17.el7_2.3
Red Hat:rhel_aus:7.3::serversudobefore 0:1.8.6p7-23.el7_3.30:1.8.6p7-23.el7_3.3
Red Hat:rhel_aus:7.3::serversudo-debuginfobefore 0:1.8.6p7-23.el7_3.30:1.8.6p7-23.el7_3.3
Red Hat:rhel_aus:7.3::serversudo-develbefore 0:1.8.6p7-23.el7_3.30:1.8.6p7-23.el7_3.3
Red Hat:rhel_aus:7.4::serversudobefore 0:1.8.19p2-12.el7_4.20:1.8.19p2-12.el7_4.2

+29

Other highest-scoring records for the same primary product.

  • CVE-2025-32463Sudo before 1.9.17p1 allows local users to obtain root access because /etc/nsswitch.conf from a user-controlled directory is used with the -KEV
    78This week
  • CVE-2019-14287In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer account can bypass certain policy blacklists and session PAM modules, a
    54Plan
  • CVE-2023-22809In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_ED
    48Plan

Published before and after this one in the same product

  • ← EarlierCVE-2021-23239Jan 12, 2021 · The sudoedit personality of Sudo before 1.9.5 may allow a local unprivileged user to perform arbitrary directory-existence tests by winning
    10Monitor
  • ← EarlierCVE-2021-23240Jan 12, 2021 · selinux_edit_copy_tfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges by
    31Monitor
  • Later →CVE-2022-43995Nov 2, 2022 · Sudo 1.8.0 through 1.9.12, with the crypt() password backend, contains a plugins/sudoers/auth/passwd.c array-out-of-bounds error that can re
    28Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
alpine:sudo1.9.5p2-r0 · Alpine:v3.10Package registry (OSV)
debian:sudo1.9.5p1-1.1 · Debian:12Package registry (OSV)
opensuse:sudo1.8.22-lp151.5.12.1 · openSUSE:Leap 15.1Package registry (OSV)
red hat:redhat-virtualization-host0:4.3.13-20210127.0.el7_9 · Red Hat:enterprise_linux:7::hypervisorPackage registry (OSV)
red hat:redhat-virtualization-host-image-update0:4.3.13-20210127.0.el7_9 · Red Hat:enterprise_linux:7::hypervisorPackage registry (OSV)
red hat:sudo0:1.8.29-6.el8_3.1 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:sudo-debuginfo0:1.8.29-6.el8_3.1 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:sudo-debugsource0:1.8.29-6.el8_3.1 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:sudo-devel0:1.8.23-10.el7_9.1 · Red Hat:enterprise_linux:7::clientPackage registry (OSV)
suse:sudo1.8.27-4.6.1 · SUSE:Linux Enterprise Software Development Kit 12 SP5Package registry (OSV)

Exploit status

Weaponized

A ready exploit tool or active in-the-wild use is known for this vulnerability. This should be your top priority.

Evidence

  • Metasploit module ×1
  • Exploit-DB entry ×2
  • Nuclei detection template ×1
  • Proof-of-concept repository on GitHub ×50

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Exploit-DB entrylocal2021-02-03
Exploit-DB entrylocal2021-02-03
Metasploit moduleexploit/linux/local/sudo_baron_sameditSudo Heap-Based Buffer Overflowexploit2021-01-26
Nuclei detection templateNuclei template CVE-2021-3156 —
Proof-of-concept repository on GitHubstars:352021-01-26
Proof-of-concept repository on GitHubstars:02021-01-27
Proof-of-concept repository on GitHubstars:1122021-01-27
Proof-of-concept repository on GitHubstars:12021-01-27
Proof-of-concept repository on GitHubstars:02021-01-27
Proof-of-concept repository on GitHubstars:32021-01-27
Proof-of-concept repository on GitHubstars:182021-01-28
Proof-of-concept repository on GitHubstars:52021-01-28

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

  1. First PoC-1 d
  2. Metasploit-1 d
  3. Published
  4. CISA KEV+434 d
  5. TodayNov 1, 2026+2104 d

No history yet (it accumulates with the daily EPSS job).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

National notice (Türkiye Cybersecurity Directorate / USOM)

Official security notices citing this record; remediation advice is on the agency's page.

All national notices →

Technical details

Attack conditions

  • Someone with local access to the system can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

Weakness class (CWE)

CWE-193 · Off-by-one Error

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

MITRE has no CAPEC/ATT&CK mapping for this CWE.

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records