PT-2021-1695 · Sudo+8 · Sudo+8

Published

2020-04-28

·

Updated

2026-06-05

·

CVE-2021-3156

CVSS v3.1

7.8

High

VectorAV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Sudo versions prior to 1.9.5p2 Sudo versions 1.8.2 through 1.8.31p2 Sudo versions 1.9.0 through 1.9.5p1
Description The issue is related to a heap-based buffer overflow in the sudo utility, which can be exploited to escalate privileges to root. This can be achieved via "sudoedit -s" and a command-line argument that ends with a single backslash character. The vulnerability allows an unprivileged user to gain root privileges on affected hosts. It is mentioned that even the account 'nobody' can exploit this vulnerability. The estimated number of potentially affected devices is not specified. There are reports of real-world incidents where this issue was exploited.
Technical details about exploitation include:
  • API Endpoints: Not specified
  • Vulnerable Parameters or Variables: A command-line argument that ends with a single backslash character
  • Function Names: The parse args() function is mentioned in relation to the vulnerability
Recommendations For Sudo versions prior to 1.9.5p2: Update to version 1.9.5p2 or later to resolve the issue. For Sudo versions 1.8.2 through 1.8.31p2: Update to version 1.9.5p2 or later to resolve the issue. For Sudo versions 1.9.0 through 1.9.5p1: Update to version 1.9.5p2 or later to resolve the issue. As a temporary workaround, consider restricting the use of the sudoedit -s command until a patch is available.

Exploit

Fix

DoS

LPE

Heap Based Buffer Overflow

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALT-PU-2020-2707
ALT-PU-2020-2731
ALT-PU-2021-1164
ALT-PU-2021-1174
ALT-PU-2021-1184
BDU:2021-00364
CESA-2020_1804
CESA-2021_0218
CESA-2021_0221
CESA-2021_1723
CVE-2021-3156
DLA-2534-1
DSA-4839-1
ELSA-2021-0218
ELSA-2021-0221
ELSA-2021-9169
MGASA-2021-0056
OESA-2021-1002
OPENSUSE-SU-2021:0169-1
OPENSUSE-SU-2021:0170-1
OPENSUSE-SU-2021:0602-1
OPENSUSE-SU-2021_0169-1
OPENSUSE-SU-2021_0170-1
OPENSUSE-SU-2021_0602-1
OPENSUSE-SU-2024:11413-1
RHSA-2020_1804
RHSA-2021:0218
RHSA-2021:0219
RHSA-2021:0220
RHSA-2021:0221
RHSA-2021:0222
RHSA-2021:0223
RHSA-2021:0224
RHSA-2021:0225
RHSA-2021:0226
RHSA-2021:0227
RHSA-2021:0395
RHSA-2021:0401
RHSA-2021_0218
RHSA-2021_0221
RHSA-2021_0227
RHSA-2021_1723
SUSE-SU-2021:0225-1
SUSE-SU-2021:0226-1
SUSE-SU-2021:0227-1
SUSE-SU-2021:0232-1
SUSE-SU-2021:0928-1
SUSE-SU-2021:1267-1
SUSE-SU-2021:1273-1
SUSE-SU-2021:1274-1
SUSE-SU-2021:1275-1
SUSE-SU-2021_0928-1
SUSE-SU-2021_1267-1
SUSE-SU-2021_1273-1
SUSE-SU-2021_1274-1
SUSE-SU-2021_1275-1
SUSE-SU-2024:4389-1
SUSE-SU-2024_4389-1
USN-4705-1
USN-4705-2

Affected Products

Alt Linux
Centos
Huawei Vrp
Linuxmint
Apple Macos
Red Hat
Sudo
Suse
Ubuntu