CVE-2021-3156

published 26 Jan 2021 · updated 21 Oct 2025

Sudo Heap-Based Buffer Overflow Vulnerability

10.0CriticalCVSS 7.8EPSS 100%CISA KEV · due 27 Apr 20223 public exploits

Exploited in the wild, in CISA KEV since 6 Apr 2022 (due 27 Apr 2022), with 3 public exploits. No fixed version is recorded.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
SudoSudo

Exploit evidence

3 public sources

kev

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Sudo, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-3156 severity on Zeptric[![CVE-2021-3156](https://zeptric.io/badge/cve/CVE-2021-3156.svg)](https://zeptric.io/cve/CVE-2021-3156)