CVE-2021-3156

Sudo Heap-Based Buffer Overflow Vulnerability

  • High 7.8
  • Exploited: added to CISA KEV 6 Apr 2022

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.

Key facts

Published
26 Jan 2021
Last changed
21 Oct 2025
Assigned by
mitre
KEV added
6 Apr 2022
KEV fix due
27 Apr 2022
EPSS
99.962% likely to be exploited in the next 30 days, higher than 99.976% of CVEs (scores for 15 Nov 2026)
SSVC (CISA)
Exploitation: active; Automatable: no; Technical impact: total

Severity scores

Each score is shown as its source gave it. They are not averaged or merged.

  • 7.8CVSS 3.1, Highfrom CISA (ADP container)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

What to do

  • Apply updates per vendor instructions.CISA KEV required action

Historical context and remediation

This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.

No separately sourced impact summary is available on this page yet. Consult the description, version data and dated exploitation evidence.

Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.

Read the original CVE record.

Affected products

VendorProductVersions
n/an/a
  • n/a (affected)

Timeline

  1. 26 Jan 2021 Published
  2. 6 Apr 2022 CVE-2021-3156 added to CISA KEV
  3. 6 Apr 2022 Added to the CISA KEV catalogue

Weakness

References