Skip to main content

CVE-2021-3156

7.8
HIGHCVSS v3.1 Base Score
92.58%
HIGH RiskEPSS (100th percentile)
KEV

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.

Published: 1/26/2021
Modified: 11/10/2025
Back to CVE Lookup

ACTIVELY EXPLOITED IN THE WILD

This vulnerability is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.

Vulnerability Name:

Sudo Heap-Based Buffer Overflow Vulnerability

Vendor / Product:

Sudo Sudo

Required Action:

Apply updates per vendor instructions.

Due Date: 4/27/2022(OVERDUE)
Added to KEV:

4/6/2022

Notes:

https://nvd.nist.gov/vuln/detail/CVE-2021-3156

Vulnerability Summary

CVSS v3 Score

7.8HIGH

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

CVSS v2 Score

7.2

AV:L/AC:L/Au:N/C:C/I:C/A:C

EPSS Score (Exploitation Probability)

92.58%HIGH Exploitation Risk
100th percentile

This vulnerability has a 92.58% probability of being exploited in the next 30 days, ranking higher than 100% of all scored CVEs.

CWE Classification

Related Vulnerabilities

Same Weakness Type(CWE-193)

CVE-2025-53014LOW 3.7

ImageMagick is free and open-source software used for editing and manipulating digital images. Versions prior to 7.1.2-0 and 6.9.13-26 have a heap buffer overflow in the `InterpretImageFilename` function. The issue stems from an off-by-one error that causes out-of-bounds memory access when processing format strings containing consecutive percent signs (`%%`). Versions 7.1.2-0 and 6.9.13-26 fix the issue.

7/14/2025
CVE-2025-43973MEDIUM 6.8

An issue was discovered in GoBGP before 3.35.0. pkg/packet/rtr/rtr.go does not verify that the input length corresponds to a situation in which all bytes are available for an RTR message.

4/21/2025
CVE-2024-51554CRITICAL 9.1

Default Credentail vulnerabilities in ASPECT on Linux allows access to the product using publicly available default credentials.  Affected products: ABB ASPECT - Enterprise v3.08.02; NEXUS Series v3.08.02; MATRIX Series v3.08.02

12/5/2024
CVE-2023-44444HIGH 7.8

GIMP PSP File Parsing Off-By-One Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GIMP. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file. The specific flaw exists within the parsing of PSP files. Crafted data in a PSP file can trigger an off-by-one error when calculating a location to write within a heap-based buffer. An attacker can leverage this vulnerability to execute code in the context of the current process. . Was ZDI-CAN-22097.

5/3/2024
CVE-2023-46853CRITICAL 9.8

In Memcached before 1.6.22, an off-by-one error exists when processing proxy requests in proxy mode, if \n is used instead of \r\n.

10/27/2023

Similar SeverityHIGH