Vulnerability · Published Jan 18, 2023 · Assigned by mitre

CVE-2023-22809

High 7.8

In plain English

A high-severity privilege mismanagement in the sudo package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 55.4% (higher than 99.0% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)55.4%top 1.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling2Metasploit, Public PoC

Official description

In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_EDITOR, VISUAL, and EDITOR), allowing a local attacker to append arbitrary entries to the list of files to process. This can lead to privilege escalation. Affected versions are 1.8.0 through 1.9.12.p1. The problem exists because a user-specified editor may contain a "--" argument that defeats a protection mechanism, e.g., an EDITOR='vim -- /path/to/extra/file' value.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8sudo1.8.29-8.el8_7.1ALSA-2023:0284
AlmaLinux:9sudo1.9.5p2-7.el9_1.1ALSA-2023:0282
AlmaLinux:9sudo-python-plugin1.9.5p2-7.el9_1.1ALSA-2023:0282
Alpine:v3.20sudo1.9.12_p2-r0ALPINE-CVE-2023-22809
Alpine:v3.21sudo1.9.12_p2-r0ALPINE-CVE-2023-22809
Alpine:v3.22sudo1.9.12_p2-r0ALPINE-CVE-2023-22809
Alpine:v3.23sudo1.9.12_p2-r0ALPINE-CVE-2023-22809
Alpine:v3.24sudo1.9.12_p2-r0ALPINE-CVE-2023-22809
Debian:12sudo1.9.12p2-1DEBIAN-CVE-2023-22809
Debian:13sudo1.9.12p2-1DEBIAN-CVE-2023-22809
Debian:14sudo1.9.12p2-1DEBIAN-CVE-2023-22809
Rocky Linux:8sudo0:1.8.29-8.el8_7.1RLSA-2023:0284
Rocky Linux:9sudo0:1.9.5p2-7.el9_1.1RLSA-2023:0282
Ubuntu:22.04:LTSsudo1.9.9-1ubuntu2.2UBUNTU-CVE-2023-22809
Ubuntu:22.04:LTSsudo1.9.9-1ubuntu2.2USN-5811-1

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

Weakness: CWE-269 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References