CVE-2023-22809

In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_EDITOR,...

Basic Information

CVE State
PUBLISHED
Reserved Date
January 06, 2023
Published Date
January 18, 2023
Last Updated
April 04, 2025
Vendor
n/a
Product
n/a
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.

CVSS Scores

CVSS v3.1

7.8 - HIGH

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

SSVC Information

Exploitation
none
Technical Impact
total

Exploit Status

Proof of Concept Available
Yes (added 2023-01-21 15:19:23 UTC) Source

Known Exploited Vulnerability Information

Source Added Date
The Shadowserver (via CIRCL) 2026-04-15 14:28:37 UTC

Scanner Integrations

Potential Proof of Concepts

Warning: These PoCs have not been tested and could contain malware. Use at your own risk.

sudoedit_bypass_priv_esc

Type: metasploit • Created: Unknown

Metasploit module for CVE-2023-22809

AntiVlad/CVE-2023-22809

Type: github • Created: 2024-08-14 07:48:10 UTC • Stars: 0

Toothless5143/CVE-2023-22809

Type: github • Created: 2023-08-06 06:46:40 UTC • Stars: 2

Running this exploit on a vulnerable system allows a local attacker to gain a root shell on the machine.

asepsaepdin/CVE-2023-22809

Type: github • Created: 2023-07-10 06:38:14 UTC • Stars: 6

pashayogi/CVE-2023-22809

Type: github • Created: 2023-06-25 15:11:01 UTC • Stars: 0

AiK1d/CVE-2023-22809-sudo-POC

Type: github • Created: 2023-04-06 03:11:48 UTC • Stars: 7

CVE-2023-22809 Linux Sudo

M4fiaB0y/CVE-2023-22809

Type: github • Created: 2023-02-22 17:50:03 UTC • Stars: 6

n3m1sys/CVE-2023-22809-sudoedit-privesc

Type: github • Created: 2023-01-21 15:19:23 UTC • Stars: 155

A script to automate privilege escalation with CVE-2023-22809 vulnerability

Timeline

  • CVE ID Reserved

  • CVE Published to Public

  • Proof of Concept Exploit Available

  • Detected by Metasploit

  • Added to KEVIntel