{"id":"CVE-2023-22809","published":"2023-01-18T00:00:00Z","modified":"2025-04-04T15:45:24Z","title":"In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided…","vendor":null,"product":null,"tier":"core","eol":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-04T15:43:57.601703Z","from":"CISA ADP","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"In Sudo versions 1.8.0 through 1.9.12p1, the sudoedit (-e) feature mishandles extra arguments supplied through the SUDO_EDITOR, VISUAL, and EDITOR environment variables, because a user-specified editor containing a \"--\" argument can defeat the protection that restricts which files are processed. A local attacker with low privileges and no user interaction can exploit this by appending arbitrary entries to the list of files to be edited, which can lead to privilege escalation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:12:43Z"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.55367,"percentile":0.99056,"date":"2026-11-20","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2024-12-06","exploitedFirstSeen":"2024-12-06","ransomware":false,"evidence":[{"url":"https://securelist.com/exploits-and-vulnerabilities-q3-2024/114839/","date":"2024-12-06"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":2,"pulses":[{"name":"ripe.arin.enom.cpanel.cpcalendar.iana.networksolutions.02050.webdisk.webmail.","url":"https://otx.alienvault.com/pulse/69fdc02bea1e4ec923b01688","created":"2026-05-08"},{"name":"ACTUALIZACION | Oracle Critical Patch Update Advisory - July 2023","url":"https://otx.alienvault.com/pulse/64bace8d5d470a6a7baaa8a9","created":"2023-07-21"}],"provenance":"machine"},"cwes":[{"id":"CWE-269","name":"Improper Privilege Management"}],"references":[{"url":"https://www.synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdf","tags":[]},{"url":"https://www.sudo.ws/security/advisories/sudoedit_any/","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00012.html","tags":["mailing-list"]},{"url":"https://www.debian.org/security/2023/dsa-5321","tags":["vendor-advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2023/01/19/1","tags":["mailing-list"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2QDGFCGAV5QRJCE6IXRXIS4XJHS57DDH/","tags":["vendor-advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20230127-0015/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G4YNBTTKTRT2ME3NTSXAPTOKYUE47XHZ/","tags":["vendor-advisory"]},{"url":"http://packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.html","tags":[]},{"url":"https://security.gentoo.org/glsa/202305-12","tags":["vendor-advisory"]},{"url":"https://support.apple.com/kb/HT213758","tags":[]},{"url":"http://packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.html","tags":[]},{"url":"http://seclists.org/fulldisclosure/2023/Aug/21","tags":["mailing-list"]},{"url":"http://packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Modification.html","tags":[]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2023-26921","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-26921","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":51217,"url":"https://www.exploit-db.com/exploits/51217","title":"sudo 1.8.0 to 1.9.12p1 - Privilege Escalation","type":"local","platform":"linux","date":"2023-04-03","verified":false,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":1,"earliest":"2023-04-03"},"pocGithub":{"count":10,"skipped":2,"earliest":"2023-01-21","earliestUrl":"https://github.com/n3m1sys/CVE-2023-22809-sudoedit-privesc","repos":[{"name":"n3m1sys/CVE-2023-22809-sudoedit-privesc","url":"https://github.com/n3m1sys/CVE-2023-22809-sudoedit-privesc","stars":163,"created":"2023-01-21"},{"name":"M4fiaB0y/CVE-2023-22809","url":"https://github.com/M4fiaB0y/CVE-2023-22809","stars":6,"created":"2023-02-22"},{"name":"P4x1s/CVE-2023-22809-sudo-POC","url":"https://github.com/P4x1s/CVE-2023-22809-sudo-POC","stars":6,"created":"2023-04-06"},{"name":"asepsaepdin/CVE-2023-22809","url":"https://github.com/asepsaepdin/CVE-2023-22809","stars":6,"created":"2023-07-10"},{"name":"Chan9Yan9/CVE-2023-22809","url":"https://github.com/Chan9Yan9/CVE-2023-22809","stars":2,"created":"2023-06-20"}]},"metasploit":[{"name":"Sudoedit Extra Arguments Priv Esc","module":"exploit/linux/local/sudoedit_bypass_priv_esc","type":"exploit","disclosureDate":"2023-01-18","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/sudoedit_bypass_priv_esc.rb"}],"first":{"date":"2023-01-18","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/sudoedit_bypass_priv_esc.rb"},"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.html","http://packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.html","http://packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Modification.html"],"flow":[],"timeline":[{"date":"2023-01-18","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2023-22809","provenance":"source"},{"date":"2023-01-18","kind":"exploit-public","label":"First public exploit: Metasploit; later: PoC-in-GitHub 2023-01-21, Exploit-DB 2023-04-03","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/sudoedit_bypass_priv_esc.rb","provenance":"source"},{"date":"2024-12-06","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://securelist.com/exploits-and-vulnerabilities-q3-2024/114839/","provenance":"source"}],"speed":{"daysToPublicExploit":0,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":66.4,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 715 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.81,"detail":"percentile 0.9906"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 Exploit-DB entry; 3 NVD exploit links; 10 PoC-in-GitHub repos; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":1.08,"detail":"2 pulses"},{"name":"CVSS severity","points":5.46,"detail":"base score 7.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}