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
- Nov 6, 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.
- CVE-2023-22809Exploit
Local privilege escalation exploit for sudo 1.8.0-1.9.12p1 via sudoedit, allowing attackers to gain root shell by manipulating the sudoers file.
A script to automate privilege escalation with CVE-2023-22809 vulnerability
Automates vulnerability check for sudo versions and privilege escalation via sudoedit if exploitable, helping users test and gain root access.
- CVE-2023-22809Exploit
Implementation of the CVE-2023-22809
- 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-22809Exploit
Analysis & Exploit
- patch_CVE-2023-22809Patch
Automated Bash script to patch CVE-2023-22809 by installing the latest sudo version, mitigating a local privilege-escalation vulnerability on Linux systems.
Educational simulation of CVE-2023-22809 Sudo privilege escalation vulnerability with automated Bash exploit script, lab manual, and mitigation guidance for controlled Linux environments.
CVE-2023-22809 Linux Sudo
Proof-of-concept exploit for CVE-2023-22809, a privilege escalation vulnerability in sudo's sudoedit feature allowing arbitrary file overwrite as root.
- CVE-2023-22809Exploit
Running this exploit on a vulnerable system allows a local attacker to gain a root shell on the machine.
n3m1.sys · linux · Apr 3, 2023
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.