CVE-2023-22809
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.
Severity: HIGH
CVE ID: CVE-2023-22809
CVSS Score: 7.8
CVSS Metrics: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Proof Of Concept
n3m1sys
A script to automate privilege escalation with CVE-2023-22809 vulnerability
Refrence: GitHub
M4fiaB0y
Refrence: GitHub
CKevens
CVE-2023-22809 Linux Sudo
Refrence: GitHub
hello4r1end
Refrence: GitHub
Chan9Yan9
Analysis & Exploit
Refrence: GitHub
pashayogi
Refrence: GitHub
asepsaepdin
Refrence: GitHub
Toothless5143
Running this exploit on a vulnerable system allows a local attacker to gain a root shell on the machine.
Refrence: GitHub