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
- Oct 17, 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
modules/exploits/linux/local/sudoedit_bypass_priv_esc.rb
Metasploit Framework modulesDeclared conditions
- platform: Linux($.exploit_linux/local/sudoedit_bypass_priv_esc.platform)
- verification: check_declared($.exploit_linux/local/sudoedit_bypass_priv_esc.check)
- 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.
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.