PT-2023-1077 · Sudo+11 · Sudo+11

Matthieu Barjole

+1

·

Published

2023-01-18

·

Updated

2025-09-29

·

CVE-2023-22809

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 1.8.0 through 1.9.12p1
Description The issue is related to the sudoedit feature in Sudo, which mishandles extra arguments passed in user-provided environment variables, such as SUDO EDITOR, VISUAL, and EDITOR. This allows a local attacker to append arbitrary entries to the list of files to process, leading to privilege escalation. The problem exists because a user-specified editor may contain a "--" argument that defeats a protection mechanism. For example, an EDITOR value like 'vim -- /path/to/extra/file' can be used to exploit this issue.
Recommendations For versions 1.8.0 through 1.9.12p1, update to a version newer than 1.9.12p2 to resolve the issue. As a temporary workaround, consider restricting the use of the sudoedit feature or limiting the environment variables that can be used with it. Additionally, avoid using the EDITOR variable with arguments that could defeat the protection mechanism, such as those containing "--".

Exploit

Fix

Protection Mechanism Failure

Improper Privilege Management

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

Weakness Enumeration

Related Identifiers

ALSA-2023:0282
ALSA-2023:0284
ALSA-2023_0282
ALSA-2023_0284
ALSA-2024_0811
ALSA-2025_16880
ALT-PU-2023-1110
ALT-PU-2023-1121
ALT-PU-2023-1147
ALT-PU-2023-1657
AZL-13030
BDU:2023-00210
CESA-2023_0284
CESA-2023_0291
CVE-2023-22809
DLA-3272-1
DSA-5321-1
ELSA-2023-0282
ELSA-2023-0284
ELSA-2023-0291
ELSA-2023-12143
MGASA-2023-0025
OESA-2023-1049
OPENSUSE-SU-2023_0114-1
OPENSUSE-SU-2024:12638-1
RHSA-2023:0280
RHSA-2023:0281
RHSA-2023:0282
RHSA-2023:0283
RHSA-2023:0284
RHSA-2023:0287
RHSA-2023:0291
RHSA-2023:0292
RHSA-2023:0293
RHSA-2023:0859
RHSA-2023:3262
RHSA-2023:3264
RHSA-2023:3276
RHSA-2023_0282
RHSA-2023_0284
RHSA-2023_0287
RHSA-2023_0291
RLSA-2023:0282
RLSA-2023:0284
RLSA-2023_0282
RLSA-2023_0284
ROSA-SA-2023-2075
SUSE-SU-2023:0100-1
SUSE-SU-2023:0101-1
SUSE-SU-2023:0114-1
SUSE-SU-2023:0115-1
SUSE-SU-2023:0116-1
SUSE-SU-2023:0117-1
SUSE-SU-2023_0100-1
SUSE-SU-2023_0101-1
SUSE-SU-2023_0114-1
SUSE-SU-2023_0115-1
SUSE-SU-2023_0116-1
SUSE-SU-2023_0117-1
USN-5811-1
USN-5811-2
USN-5811-3

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Linuxmint
Apple Macos
Red Hat
Red Os
Rocky Linux
Sudo
Suse
Ubuntu