← Vulnerability feed

Vulnerability record · CVE-2023-22809 · published 18 January 2023

CVE-2023-22809: Sudo sudoedit Argument Injection Enables Local Privilege Escalation

Sudo Project · Sudo

Sudo before 1.9.12p2 mishandles extra arguments supplied through the SUDO_EDITOR, VISUAL, and EDITOR environment variables in the sudoedit (-e) feature. A user-specified editor value containing a "--" argument defeats a protection mechanism, letting an attacker append arbitrary file paths to the list of files sudoedit processes. This allows a local user to edit files they should not have write access to, resulting in privilege escalation.

7.8 CVSS 3.1 High EPSS 55% · top 1.0% CWE-269 · Improper privilege management
7.8CVSS 3.1 base score
55%EPSS exploitation probability, 30 days
NoNot in CISA KEV
4Affected product versions listed by NVD
28References, 6 tagged exploit
17 Jun 2026Last modified by NVD

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:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

high priorityLocal privilege escalation to root with public exploit code and a very high EPSS score, though it requires an existing local account with sudoedit access.

What it is

Sudo before 1.9.12p2 mishandles extra arguments supplied through the SUDO_EDITOR, VISUAL, and EDITOR environment variables in the sudoedit (-e) feature. A user-specified editor value containing a "--" argument defeats a protection mechanism, letting an attacker append arbitrary file paths to the list of files sudoedit processes. This allows a local user to edit files they should not have write access to, resulting in privilege escalation.

Impact

An attacker with a local account and sudoedit privileges gains the ability to modify arbitrary files with elevated privileges, which can lead to full root compromise. The CVSS vector shows high confidentiality, integrity, and availability impact.

Attack surface

Reached locally by a user who can invoke sudoedit (sudo -e) and control the EDITOR, VISUAL, or SUDO_EDITOR environment variable. No user interaction beyond running the command is required, and the attacker must already hold a local account with sudoedit permission.

Exploitation

Not listed in CISA KEV, but EPSS is very high (0.55367, 98.986th percentile) and multiple references are tagged Exploit, including the vendor advisory and a Synacktiv technical writeup, indicating public exploit code exists.

What to do

  • Upgrade sudo to 1.9.12p2 or later; affected versions are 1.8.0 through 1.9.12p1.
  • Apply vendor patches for Debian, Fedora, Apple macOS, Gentoo, and NetApp products listed in the references.
  • Restrict sudoedit (sudo -e) privileges in sudoers to only users who genuinely require them.
  • Where sudoedit cannot be removed, avoid granting it on sensitive files and review sudoers rules for broad file-edit permissions.
  • Monitor and constrain user-controlled EDITOR, VISUAL, and SUDO_EDITOR environment variables in sudo configurations where possible.

Detection

  • Audit sudoers for sudoedit (sudo -e) entries and identify which users and groups can use them.
  • Monitor process execution for sudoedit or sudo -e invocations where EDITOR, VISUAL, or SUDO_EDITOR contains a "--" argument or unexpected file paths.
  • Alert on writes to sensitive files (for example /etc/sudoers, /etc/passwd, /etc/shadow) originating from sudoedit processes.
  • Track sudo version inventory to find hosts still running 1.8.0 through 1.9.12p1.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

4 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.html Third Party AdvisoryVDB Entry
http://packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.html Third Party AdvisoryVDB Entry
http://packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Modific Third Party AdvisoryVDB Entry
http://seclists.org/fulldisclosure/2023/Aug/21 Mailing ListThird Party Advisory
http://www.openwall.com/lists/oss-security/2023/01/19/1 ExploitMailing ListThird Party Advisory
https://lists.debian.org/debian-lts-announce/2023/01/msg00012.html Mailing ListThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2QDGFCGAV5QRJCE6IXRXIS4 Mailing List
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G4YNBTTKTRT2ME3NTSXAPTO Mailing List
https://security.gentoo.org/glsa/202305-12 Third Party Advisory
https://security.netapp.com/advisory/ntap-20230127-0015/ Third Party Advisory
https://support.apple.com/kb/HT213758 Third Party Advisory
https://www.debian.org/security/2023/dsa-5321 Third Party Advisory
https://www.sudo.ws/security/advisories/sudoedit_any/ ExploitMitigationVendor Advisory
https://www.synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdf ExploitMitigationTechnical DescriptionThird Party Advisory
http://packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.html Third Party AdvisoryVDB Entry
http://packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.html Third Party AdvisoryVDB Entry
http://packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Modific Third Party AdvisoryVDB Entry
http://seclists.org/fulldisclosure/2023/Aug/21 Mailing ListThird Party Advisory
http://www.openwall.com/lists/oss-security/2023/01/19/1 ExploitMailing ListThird Party Advisory
https://lists.debian.org/debian-lts-announce/2023/01/msg00012.html Mailing ListThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2QDGFCGAV5QRJCE6IXRXIS4 Mailing List
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G4YNBTTKTRT2ME3NTSXAPTO Mailing List
https://security.gentoo.org/glsa/202305-12 Third Party Advisory
https://security.netapp.com/advisory/ntap-20230127-0015/ Third Party Advisory
https://support.apple.com/kb/HT213758 Third Party Advisory
https://www.debian.org/security/2023/dsa-5321 Third Party Advisory
https://www.sudo.ws/security/advisories/sudoedit_any/ ExploitMitigationVendor Advisory
https://www.synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdf ExploitMitigationTechnical DescriptionThird Party Advisory

Track CVE-2023-22809 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-43300Apple iOS, iPadOS and macOS out-of-bounds write via malicious imageAn out-of-bounds write in Apple iOS, iPadOS and macOS is triggered when processing a malicious image file, causing memory corruption. Apple states th…KEVEPSS 22%analysed10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2025-24085Apple iOS, iPadOS, macOS, tvOS, visionOS, watchOS Use-After-Free Privilege EscalationA use-after-free flaw in Apple's operating systems was fixed through improved memory management in iOS 18.3, iPadOS 18.3 and 17.7.6, macOS Sequoia 15…KEVEPSS 18%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-65400Apple macOS Screen Sharing authentication bypassAn improper authentication flaw in Apple macOS Screen Sharing allows a network attacker to authenticate without valid credentials. Apple fixed it via…KEVEPSS 1.2%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed

Source: NIST National Vulnerability Database (record CVE-2023-22809), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.