CVE-2021-3156
Sudo Heap-Based Buffer Overflow Vulnerability
- Published
- Jan 26, 2021
- Updated
- Oct 21, 2025
- Assigning CNA
- mitre
- Evidence observed
- Feb 3, 2021
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HHigh · next 30 days
- Percentile
- 100.0%
- Model date
- Sep 21, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
CISA Known Exploited
This CVE appears in the CISA Known Exploited Vulnerabilities catalog.
Summary
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
79- CVE-2021-3156Exploit
Sudo Heap Overflow Baron Samedit
- CVE-2021-3156-PoCExploit
Heap-based buffer overflow exploit for CVE-2021-3156 in sudo, offering local privilege escalation to root on vulnerable Linux systems.
- CVE-2021-3156Exploit
CVE-2021-3156: Heap-Based Buffer Overflow in Sudo (Baron Samedit)
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.