CVE & CISA-KEV Catalog

CVE-2021-3156

HIGHCISA KEVEPSS 100th pctl
7.8
CVSS v3
NVD

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.

How to fix

Remediation Available
sudoAmazon
Fixed in:0:1.8.23-4.amzn2.2.1
Fixed in:0:1.8.23-4.amzn2.2.1
Fixed in:0:1.8.23-4.amzn2.2.1
sudo-debuginfoAmazon
Fixed in:0:1.8.23-4.amzn2.2.1
Fixed in:0:1.8.23-4.amzn2.2.1
Fixed in:0:1.8.23-4.amzn2.2.1
sudo-develAmazon
Fixed in:0:1.8.23-4.amzn2.2.1
Fixed in:0:1.8.23-4.amzn2.2.1
Fixed in:0:1.8.23-4.amzn2.2.1
sudoDebian
Fixed in:1.9.5p1-1.1CVE-2021-3156
Fixed in:1.9.5p1-1.1CVE-2021-3156
Fixed in:1.9.5p1-1.1CVE-2021-3156
sudoUbuntu
Fixed in:1.8.9p5-1ubuntu1.5+esm6USN-4705-2

This Ubuntu release reached end-of-life on 2019-04-02.

Fixed in:1.8.16-0ubuntu1.10USN-4705-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:1.8.21p2-3ubuntu1.4USN-4705-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:1.8.31-1ubuntu1.2USN-4705-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

sudo-ldapUbuntu
Fixed in:1.8.16-0ubuntu1.10USN-4705-1

This Ubuntu release reached end-of-life on 2021-04-02.

Fixed in:1.8.21p2-3ubuntu1.4USN-4705-1

This Ubuntu release reached end-of-life on 2023-05-31. Extended security maintenance is available until 2028-04-01.

Fixed in:1.8.31-1ubuntu1.2USN-4705-1

This Ubuntu release reached end-of-life on 2025-05-31. Extended security maintenance is available until 2030-04-02.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Exploit Intelligence

99.97%probability of exploitation in 30 days
100thpercentile

Very high risk: more likely to be exploited than 100% of all known CVEs.

Known Exploited Vulnerability (CISA KEV)

Sudo Heap-Based Buffer Overflow Vulnerability

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

Apply updates per vendor instructions.

Remediation due: 2022-04-27

References

Related Vulnerabilities

Other CWE-193 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2003-0466Critical9.878%--
CVE-2023-44444High7.856%-Fix
CVE-2021-23017High7.753%-Fix
CVE-2023-28709High7.548%-Fix
CVE-2018-8828Critical9.830%-Fix
CVE-2001-0609Critical9.818%--

Common questions

How do I fix CVE-2021-3156?

Published advisories record a fix for 6 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2021-3156 being actively exploited?

Yes. CVE-2021-3156 is listed in the CISA Known Exploited Vulnerabilities catalog, which means exploitation has been observed in the wild. US federal agencies were required to remediate it by 2022-04-27. Treat it as a priority whatever its CVSS score says.

How severe is CVE-2021-3156?

CVE-2021-3156 has a CVSS v3 base score of 7.8, rated high. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2021-3156 affect?

Published advisories record a fix for sudo (Amazon), sudo-debuginfo (Amazon), sudo-devel (Amazon), sudo (Debian), and 2 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2021-3156
CVE-2021-3156 severity badge

Markdown

[![CVE-2021-3156](https://tridentstack.com/cve/badge/CVE-2021-3156.svg)](https://tridentstack.com/cve/CVE-2021-3156)

HTML

<a href="https://tridentstack.com/cve/CVE-2021-3156"><img src="https://tridentstack.com/cve/badge/CVE-2021-3156.svg" alt="CVE-2021-3156"></a>

This vulnerability is actively exploited in the wild

TridentStack Control detects known-exploited CVEs across your Linux fleet and prioritizes their patches. 200 endpoints free forever.

Scan your fleet freeStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-06-17.