# CVE-2021-3156: Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which all…

- Vendor: BeyondTrust, Privilege Management for Mac, Privilege Management For Unix\/Linux
- Severity: HIGH (CVSS 3.1 7.8)
- Exploited (CISA KEV): not listed
- EPSS: 100.0% on 2026-12-02
- Public exploit: not checked
- Patch available: no or unknown
- Vendor advisory: 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
- Published: 2021-01-26; updated: 2024-09-18
- Page: https://patchtonight.com/cve/CVE-2021-3156/

## Affected and fixed versions

| Affected | Fixed in |
| --- | --- |
| n/a n/a | See the advisory |

## The vendor's 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.

## Sources

- [BeyondTrust advisory](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)

---

Data from PatchTonight (https://patchtonight.com), compiled from vendor advisories, CISA KEV and FIRST EPSS. Please credit PatchTonight and link to the CVE page when you use it.
