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, VISUAL,...
- Published
- Jan 18, 2023
- Updated
- Apr 4, 2025
- Assigning CNA
- mitre
- Evidence observed
- Apr 3, 2023
Primary CVSS
nvd · CVSS 3.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HHigh · next 30 days
- Percentile
- 99.0%
- Model date
- Sep 21, 2026
EPSS is a statistical estimate, not a certainty or a measure of impact. Combine it with CVSS, KEV status, exposure and your environment.
Summary
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.
Sources
13- CVE-2023-22809Exploit
Automated local privilege escalation exploit for CVE-2023-22809 (sudoedit -e) that checks sudo permissions and modifies sudoers to gain a root shell. For authorized security testing.
- CVE-2023-22809-ExploiterExploit
Python and Bash scripts to exploit CVE-2023-22809 in sudo versions 1.8.0-1.9.12p1 for local privilege escalation via sudoedit.
- CVE-2023-22809Exploit
Responsible use
Use vulnerability information only on systems you own or are authorized to test. Kitploit links to public research metadata and does not store exploit code or malicious payloads.