Skip to content

CVE-2021-3156

Sudo Heap-Based Buffer Overflow Vulnerability

  • Actively exploited
  • High · 7.8 of 10
Exploited since
6 Apr 2022
added to the CISA list
Chance of attacks
over 99.9%
in the next 30 days (FIRST EPSS)
Fix deadline
27 Apr 2022
for US federal agencies
Published
26 Jan 2021
in the NVD

What this means

Sudo contains an off-by-one error that can result in a heap-based buffer overflow, which allows for privilege escalation.

CISA

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.

NIST National Vulnerability Database

What to do

Apply updates per vendor instructions.

CISA's required action. If you use the product, install the vendor's update as soon as possible.

Affected

  • n/a n/a

Official sources

Data from the NIST National Vulnerability Database, the CISA Known Exploited Vulnerabilities list, FIRST EPSS and ENISA, checked 19 Nov 2026. CVSS vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

May we count your visit with Google Analytics? It sets cookies only if you accept. Privacy Policy