CVE-2021-3156
published high CVSS 3.1 · 7.8sudo: Heap buffer overflow in argument parsing
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| Amazon Linux | AL2 | Release evaluationALAS2-2021-1590 | Fixed | Not stated | Amazon Linux assessment |
| Alpine Linux | edge | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Debian | buster | sudo | Advisory build | 1.8.27-1+deb10u3 | DSA-4839-1 |
| Oracle Linux | 6 | sudoi686 | Advisory build | 0:1.8.6p3-29.0.3.el6_10.3 | ELSA-2021-9169 |
| Red Hat Enterprise Linux | RHEL-6 | sudoi686 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Alpine Linux | v3.10 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.11 | sudo | Fixed | 1.8.31-r1 | Package fix record |
Show 94 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.12 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.13 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.14 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.15 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.16 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.17 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.18 | sudo | Fixed | 1.9.5p2-r0 | Package fix record |
| Alpine Linux | v3.19 | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Alpine Linux | v3.20 | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Alpine Linux | v3.21 | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Alpine Linux | v3.22 | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Alpine Linux | v3.23 | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Alpine Linux | v3.24 | sudo | Fixed | 1.9.5_p2-r0 | Package fix record |
| Debian | stretch | sudo | Advisory build | 1.8.19p1-2.1+deb9u3 | DLA-2534-1 |
| Oracle Linux | 6 | sudox86_64 | Advisory build | 0:1.8.6p3-29.0.3.el6_10.3 | ELSA-2021-9169 |
| Oracle Linux | 6 | sudo-develi686 | Advisory build | 0:1.8.6p3-29.0.3.el6_10.3 | ELSA-2021-9169 |
| Oracle Linux | 6 | sudo-develx86_64 | Advisory build | 0:1.8.6p3-29.0.3.el6_10.3 | ELSA-2021-9169 |
| Oracle Linux | 7 | sudoaarch64 | Advisory build | 0:1.8.23-10.el7_9.1 | ELSA-2021-0221 |
| Oracle Linux | 7 | sudox86_64 | Advisory build | 0:1.8.23-10.el7_9.1 | ELSA-2021-0221 |
| Oracle Linux | 7 | sudo-develaarch64 | Advisory build | 0:1.8.23-10.el7_9.1 | ELSA-2021-0221 |
| Oracle Linux | 7 | sudo-develx86_64 | Advisory build | 0:1.8.23-10.el7_9.1 | ELSA-2021-0221 |
| Oracle Linux | 8 | sudoaarch64 | Advisory build | 0:1.8.29-6.el8_3.1 | ELSA-2021-0218 |
| Oracle Linux | 8 | sudox86_64 | Advisory build | 0:1.8.29-6.el8_3.1 | ELSA-2021-0218 |
| Red Hat Enterprise Linux | RHEL-6 | sudos390x | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudosrc | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudox86_64 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-debuginfoi686 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-debuginfos390 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-debuginfos390x | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-debuginfox86_64 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-develi686 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-devels390 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-devels390x | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-6 | sudo-develx86_64 | Advisory build | 1.8.6p3-29.el6_10.4 | RHSA-2021:0227 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64le | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64le | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64le | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudoppc64le | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudos390x | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudos390x | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudos390x | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudosrc | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudosrc | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudosrc | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudosrc | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudosrc | Advisory build | 1.8.6p7-17.el7_2.3 | RHSA-2021:0226 |
| Red Hat Enterprise Linux | RHEL-7 | sudosrc | Advisory build | 1.8.6p7-23.el7_3.3 | RHSA-2021:0225 |
| Red Hat Enterprise Linux | RHEL-7 | sudox86_64 | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudox86_64 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudox86_64 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudox86_64 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudox86_64 | Advisory build | 1.8.6p7-17.el7_2.3 | RHSA-2021:0226 |
| Red Hat Enterprise Linux | RHEL-7 | sudox86_64 | Advisory build | 1.8.6p7-23.el7_3.3 | RHSA-2021:0225 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoi686 | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoi686 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoi686 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoi686 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoi686 | Advisory build | 1.8.6p7-17.el7_2.3 | RHSA-2021:0226 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoi686 | Advisory build | 1.8.6p7-23.el7_3.3 | RHSA-2021:0225 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64le | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64le | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64le | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfoppc64le | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfos390 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfos390 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfos390 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfos390x | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfos390x | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfos390x | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfox86_64 | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfox86_64 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfox86_64 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfox86_64 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfox86_64 | Advisory build | 1.8.6p7-17.el7_2.3 | RHSA-2021:0226 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-debuginfox86_64 | Advisory build | 1.8.6p7-23.el7_3.3 | RHSA-2021:0225 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develi686 | Advisory build | 1.8.19p2-12.el7_4.2 | RHSA-2021:0224 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develi686 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develi686 | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develi686 | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develi686 | Advisory build | 1.8.6p7-17.el7_2.3 | RHSA-2021:0226 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develi686 | Advisory build | 1.8.6p7-23.el7_3.3 | RHSA-2021:0225 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develppc | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develppc | Advisory build | 1.8.23-3.el7_6.2 | RHSA-2021:0223 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develppc | Advisory build | 1.8.23-4.el7_7.3 | RHSA-2021:0222 |
| Red Hat Enterprise Linux | RHEL-7 | sudo-develppc64 | Advisory build | 1.8.23-10.el7_9.1 | RHSA-2021:0221 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- CISA-ADP · adp
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
2- n/a
- CWE-193 CWE-193 Off-by-one Error
References
35- http://packetstormsecurity.com/files/161160/Sudo-Heap-Based-Buffer-Overflow.html
- http://packetstormsecurity.com/files/161230/Sudo-Buffer-Overflow-Privilege-Escalation.html
- http://packetstormsecurity.com/files/161270/Sudo-1.9.5p1-Buffer-Overflow-Privilege-Escalation.html
- http://packetstormsecurity.com/files/161293/Sudo-1.8.31p2-1.9.5p1-Buffer-Overflow.html
- http://packetstormsecurity.com/files/176932/glibc-syslog-Heap-Based-Buffer-Overflow.html
- 20210211 APPLE-SA-2021-02-09-1 macOS Big Sur 11.2.1, macOS Catalina 10.15.7 Supplemental Update, and macOS Mojave 10.14.6 Security Update 2021-002 http://seclists.org/fulldisclosure/2021/Feb/42
- 20210126 Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156) http://seclists.org/fulldisclosure/2021/Jan/79
- 20240204 CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog() http://seclists.org/fulldisclosure/2024/Feb/3
- [oss-security] 20210126 Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156) http://www.openwall.com/lists/oss-security/2021/01/26/3
- [oss-security] 20210127 Re: Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156) http://www.openwall.com/lists/oss-security/2021/01/27/1
- [oss-security] 20210127 Re: Baron Samedit: Heap-based buffer overflow in Sudo (CVE-2021-3156) http://www.openwall.com/lists/oss-security/2021/01/27/2
- [oss-security] 20210215 Re: sudo: Ineffective NO_ROOT_MAILER and Baron Samedit http://www.openwall.com/lists/oss-security/2021/02/15/1
- [oss-security] 20210914 Re: Oracle Solaris membership in the distros list http://www.openwall.com/lists/oss-security/2021/09/14/2
- [oss-security] 20240130 CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog() http://www.openwall.com/lists/oss-security/2024/01/30/6
- [oss-security] 20240130 Re: CVE-2023-6246: Heap-based buffer overflow in the glibc's syslog() http://www.openwall.com/lists/oss-security/2024/01/30/8
- https://kc.mcafee.com/corporate/index?page=content&id=SB10348
- [debian-lts-announce] 20210126 [SECURITY] [DLA 2534-1] sudo security update https://lists.debian.org/debian-lts-announce/2021/01/msg00022.html
- FEDORA-2021-8840cbdccd https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CALA5FTXIQBRRYUA2ZQNJXB6OQMAXEII/
- FEDORA-2021-2cb63d912a https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LHXK6ICO5AYLGFK2TAX5MZKUXTUKWOJY/
- GLSA-202101-33 https://security.gentoo.org/glsa/202101-33
- https://security.netapp.com/advisory/ntap-20210128-0001/
- https://security.netapp.com/advisory/ntap-20210128-0002/
- https://support.apple.com/kb/HT212177
- 20210129 Sudo Privilege Escalation Vulnerability Affecting Cisco Products: January 2021 https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sudo-privesc-jan2021-qnYQfcM
- https://www.beyondtrust.com/blog/entry/security-advisory-privilege-management-for-unix-linux-pmul-basic-and-privilege-management-for-mac-pmm-affected-by-sudo-vulnerability
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-3156
- DSA-4839 https://www.debian.org/security/2021/dsa-4839
- VU#794544 https://www.kb.cert.org/vuls/id/794544
- https://www.openwall.com/lists/oss-security/2021/01/26/3
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://www.sudo.ws/stable.html#1.9.5p2
- https://www.synology.com/security/advisory/Synology_SA_21_02
- https://www.vicarius.io/vsociety/posts/sudoedit-pwned-cve-2021-3156
Provider assertions
3mitre · cna
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 36a89dab3531a5245ee696b08133300933d3ef91242dbc38a6e9400a31f59075
- Ingested
- 23 Sep 2026, 07:55:44 UTC
- Source record
- Official CVE record