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.
- BDU:2021-00364
- DLA-2534-1
- DSA-4839-1
- openSUSE-SU-2021:0169-1
- openSUSE-SU-2021:0170-1
- openSUSE-SU-2021:0602-1
- openSUSE-SU-2024:11413-1
- RHSA-2021:0218
- RHSA-2021:0219
- RHSA-2021:0220
- RHSA-2021:0221
- RHSA-2021:0222
- RHSA-2021:0223
- RHSA-2021:0224
- RHSA-2021:0225
- RHSA-2021:0226
- RHSA-2021:0227
- RHSA-2021:0395
- RHSA-2021:0401
- SUSE-SU-2021:0225-1
- Published
- Jan 26, 2021
- Updated
- Jun 17, 2026
- EPSS
- 99.9% · 99th percentile
- CWE
- CWE-193
Report tools
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.
Running WordPress? Scan your site free with WP Lens
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 helpAffected 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.
| Vendor | Product | CPE |
|---|---|---|
| sudo project | sudo | cpe:2.3:a:sudo_project:sudo |
| netapp | cloud backup | cpe:2.3:a:netapp:cloud_backup |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| netapp | active iq unified manager | cpe:2.3:a:netapp:active_iq_unified_manager |
| netapp | hci management node | cpe:2.3:a:netapp:hci_management_node |
| netapp | oncommand unified manager core package | cpe:2.3:a:netapp:oncommand_unified_manager_core_package |
| netapp | ontap select deploy administration utility | cpe:2.3:a:netapp:ontap_select_deploy_administration_utility |
| netapp | ontap tools | cpe:2.3:a:netapp:ontap_tools |
| netapp | solidfire | cpe:2.3:a:netapp:solidfire |
| mcafee | web gateway | cpe:2.3:a:mcafee:web_gateway |
| synology | diskstation manager unified controller | cpe:2.3:a:synology:diskstation_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.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.10 | sudo | from 1.8.2 · before 1.9.5p2-r0 | 1.9.5p2-r0 |
| Alpine:v3.11 | sudo | from 1.8.2 · before 1.8.31-r1 | 1.8.31-r1 |
| Debian:10 | sudo | before 1.8.27-1+deb10u3 | 1.8.27-1+deb10u3 |
| Debian:12 | sudo | before 1.9.5p1-1.1 | 1.9.5p1-1.1 |
| Debian:9 | sudo | before 1.8.19p1-2.1+deb9u3 | 1.8.19p1-2.1+deb9u3 |
| openSUSE:Leap 15.1 | sudo | before 1.8.22-lp151.5.12.1 | 1.8.22-lp151.5.12.1 |
| openSUSE:Leap 15.2 | sudo | before 1.8.22-lp152.8.9.1 | 1.8.22-lp152.8.9.1 |
| openSUSE:Leap 15.2 | sudo | before 1.8.22-lp152.8.6.1 | 1.8.22-lp152.8.6.1 |
| openSUSE:Tumbleweed | sudo | before 1.9.7p2-1.4 | 1.9.7p2-1.4 |
| Red Hat:enterprise_linux:7::client | sudo | before 0:1.8.23-10.el7_9.1 | 0:1.8.23-10.el7_9.1 |
| Red Hat:enterprise_linux:7::client | sudo-debuginfo | before 0:1.8.23-10.el7_9.1 | 0:1.8.23-10.el7_9.1 |
| Red Hat:enterprise_linux:7::client | sudo-devel | before 0:1.8.23-10.el7_9.1 | 0:1.8.23-10.el7_9.1 |
| Red Hat:enterprise_linux:7::hypervisor | redhat-virtualization-host | before 0:4.3.13-20210127.0.el7_9 | 0:4.3.13-20210127.0.el7_9 |
| Red Hat:enterprise_linux:7::hypervisor | redhat-virtualization-host-image-update | before 0:4.3.13-20210127.0.el7_9 | 0:4.3.13-20210127.0.el7_9 |
| Red Hat:enterprise_linux:8::baseos | sudo | before 0:1.8.29-6.el8_3.1 | 0:1.8.29-6.el8_3.1 |
| Red Hat:enterprise_linux:8::baseos | sudo-debuginfo | before 0:1.8.29-6.el8_3.1 | 0:1.8.29-6.el8_3.1 |
| Red Hat:enterprise_linux:8::baseos | sudo-debugsource | before 0:1.8.29-6.el8_3.1 | 0:1.8.29-6.el8_3.1 |
| Red Hat:rhel_aus:7.2::server | sudo | before 0:1.8.6p7-17.el7_2.3 | 0:1.8.6p7-17.el7_2.3 |
| Red Hat:rhel_aus:7.2::server | sudo-debuginfo | before 0:1.8.6p7-17.el7_2.3 | 0:1.8.6p7-17.el7_2.3 |
| Red Hat:rhel_aus:7.2::server | sudo-devel | before 0:1.8.6p7-17.el7_2.3 | 0:1.8.6p7-17.el7_2.3 |
| Red Hat:rhel_aus:7.3::server | sudo | before 0:1.8.6p7-23.el7_3.3 | 0:1.8.6p7-23.el7_3.3 |
| Red Hat:rhel_aus:7.3::server | sudo-debuginfo | before 0:1.8.6p7-23.el7_3.3 | 0:1.8.6p7-23.el7_3.3 |
| Red Hat:rhel_aus:7.3::server | sudo-devel | before 0:1.8.6p7-23.el7_3.3 | 0:1.8.6p7-23.el7_3.3 |
| Red Hat:rhel_aus:7.4::server | sudo | before 0:1.8.19p2-12.el7_4.2 | 0:1.8.19p2-12.el7_4.2 |
+29
Same product
sudo project: all recordsOther 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 -KEV78This 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, a54Plan
- CVE-2023-22809In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_ED48Plan
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 by31Monitor
- 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 re28Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:sudo | 1.9.5p2-r0 · Alpine:v3.10 | Package registry (OSV) |
| debian:sudo | 1.9.5p1-1.1 · Debian:12 | Package registry (OSV) |
| opensuse:sudo | 1.8.22-lp151.5.12.1 · openSUSE:Leap 15.1 | Package registry (OSV) |
| red hat:redhat-virtualization-host | 0:4.3.13-20210127.0.el7_9 · Red Hat:enterprise_linux:7::hypervisor | Package registry (OSV) |
| red hat:redhat-virtualization-host-image-update | 0:4.3.13-20210127.0.el7_9 · Red Hat:enterprise_linux:7::hypervisor | Package registry (OSV) |
| red hat:sudo | 0:1.8.29-6.el8_3.1 · Red Hat:enterprise_linux:8::baseos | Package registry (OSV) |
| red hat:sudo-debuginfo | 0:1.8.29-6.el8_3.1 · Red Hat:enterprise_linux:8::baseos | Package registry (OSV) |
| red hat:sudo-debugsource | 0:1.8.29-6.el8_3.1 · Red Hat:enterprise_linux:8::baseos | Package registry (OSV) |
| red hat:sudo-devel | 0:1.8.23-10.el7_9.1 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| suse:sudo | 1.8.27-4.6.1 · SUSE:Linux Enterprise Software Development Kit 12 SP5 | Package 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.
| Source | Kind | Date |
|---|---|---|
| Exploit-DB entry | local | 2021-02-03 |
| Exploit-DB entry | local | 2021-02-03 |
| Metasploit module | exploit/linux/local/sudo_baron_sameditSudo Heap-Based Buffer Overflowexploit | 2021-01-26 |
| Nuclei detection template | Nuclei template CVE-2021-3156 | — |
| Proof-of-concept repository on GitHub | stars:35 | 2021-01-26 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-01-27 |
| Proof-of-concept repository on GitHub | stars:112 | 2021-01-27 |
| Proof-of-concept repository on GitHub | stars:1 | 2021-01-27 |
| Proof-of-concept repository on GitHub | stars:0 | 2021-01-27 |
| Proof-of-concept repository on GitHub | stars:3 | 2021-01-27 |
| Proof-of-concept repository on GitHub | stars:18 | 2021-01-28 |
| Proof-of-concept repository on GitHub | stars:5 | 2021-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.
- First PoC-1 d
- Metasploit-1 d
- Published
- CISA KEV+434 d
- 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.
Credits
All researchersFinders, 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.
- TR-21-0961 · Dec 1, 2021(Zoho Güvenlik Zafiyeti)
- TR-21-0960 · Dec 1, 2021(Johnson Controls Güvenlik Zafiyeti )
- TR-21-0700 · Sep 3, 2021(Johnson Controls Güvenlik Bildirimi)
- TR-21-0448 · Jun 7, 2021(IBM Güvenlik Bülteni Yayınladı)
- TR-21-0084 · Jan 29, 2021(Sudo Güvenlik Zafiyeti)
- TR-21-0077 · Jan 28, 2021(Sudo Güvenlik Zafiyeti)
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 ErrorCVSS 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
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (19 more)Show less
- www.openwall.com/lists/oss-security/2021/01/27/1
- www.openwall.com/lists/oss-security/2021/01/27/2
- www.openwall.com/lists/oss-security/2021/09/14/2
- www.openwall.com/lists/oss-security/2024/01/30/8
- kc.mcafee.com/corporate/index?page=content&id=SB10348
- lists.debian.org/debian-lts-announce/2021/01/msg00022.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/
- security.gentoo.org/glsa/202101-33
- security.netapp.com/advisory/ntap-20210128-0001/
- security.netapp.com/advisory/ntap-20210128-0002/
- support.apple.com/kb/HT212177
- tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM
- www.beyondtrust.com/blog/entry/security-advisory-privilege-management-for-unix-linux-pmul-basic-and-privilege-management-for-mac-pmm-affected-by-sudo-vulnerability
- www.debian.org/security/2021/dsa-4839
- www.kb.cert.org/vuls/id/794544
- www.oracle.com//security-alerts/cpujul2021.html
- www.oracle.com/security-alerts/cpuapr2022.html
- www.oracle.com/security-alerts/cpuoct2021.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.