CVE-2021-3156: Sudo - Privilege Escalation
- Cve: CVE-2021-3156
- Name: Sudo - Privilege Escalation
- 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.
- Impact: Attackers can escalate privileges to root, potentially leading to full system compromise.
- Remediation: Update to version 1.9.5p2 or later.
- Vulnerability type: buffer_overflow
- Vulnerability impact: privilege_escalation
- Requirement type: logged_in
- Requirements: Attacker needs local access and command execution capability
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.8
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.99962
- Epss percentile: 0.99976
- Assignee: [email protected]
- Published at: 2021-01-26T21:15:12Z
- Age in days: 2127
- Modified at: 2026-06-17T04:04:45Z
- Patch available: yes
- Public exploits total: 100
- Public exploits capped: yes
- References total: 41
- Products total: 24
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-3156
- Nvd status: analyzed
- Checked, none or zero: rejected by nvd
Cwe
| Id | Name |
|---|---|
| CWE-193 | Off-by-one Error |
Known exploited entries
| List | Added date | Due date | Ransomware use |
|---|---|---|---|
| cisa | 2022-04-06 | 2022-04-27 | no |
| vulncheck | 2022-04-06 | — | no |
Nuclei templates
| Id | Url |
|---|---|
| CVE-2021-3156 | https://github.com/projectdiscovery/nuclei-templates/blob/main/code/cves/2021/CVE-2021-3156.yaml |
Hackerone
- Reports: 4
- Rank: 1320
Public exploits
Same in every row:
- Source: nvd
- Added date: 2021-01-26
References
Same in every row:
- Source: nvd
Products
Same in every row:
- Platform bound: no
- Sources: nvd
| Product | Affected | Url |
|---|---|---|
| sudo_project:sudo | = 1.9.5; = 1.9.5 patch1; >= 1.9.0, < 1.9.5; >= 1.8.2, < 1.8.32 | /v1/products/sudo_project/sudo |
| debian:debian_linux | = 10.0, = 9.0 | /v1/products/debian/debian_linux |
| fedoraproject:fedora | = 33, = 32 | /v1/products/fedoraproject/fedora |
| netapp:active_iq_unified_manager | all versions | /v1/products/netapp/active_iq_unified_manager |
| netapp:cloud_backup | all versions | /v1/products/netapp/cloud_backup |
| netapp:solidfire | all versions | /v1/products/netapp/solidfire |
| netapp:ontap_select_deploy_administration_utility | all versions | /v1/products/netapp/ontap_select_deploy_administration_utility |
| netapp:hci_management_node | all versions | /v1/products/netapp/hci_management_node |
| synology:diskstation_manager | = 6.2 | /v1/products/synology/diskstation_manager |
| mcafee:web_gateway | = 10.0.4, = 9.2.8, = 8.2.17 | /v1/products/mcafee/web_gateway |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| sudo-project/sudo | fix | yes | /v1/repositories/sudo-project/sudo |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Known exploited: yes
- Known exploited since: 2022-04-06
- Known exploited by: cisa, vulncheck
- Vulncheck known exploited since: 2022-04-06
- Exploitation seen: yes
- Public exploit: yes
- Public exploit count: 100
- Public exploit first date: 2021-01-26
- Authentication required: yes
- Hackerone reports: 4
- Exposed hosts: 4706702
- Checked, none or zero: initial access, remote
- Not known: initial access since