{"id":"CVE-2023-22809","details":"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.","modified":"2026-04-02T08:47:45.734853Z","published":"2023-01-18T17:15:10.353Z","related":["ALSA-2023:0282","ALSA-2023:0284","MGASA-2023-0025","SUSE-SU-2023:0100-1","SUSE-SU-2023:0101-1","SUSE-SU-2023:0114-1","SUSE-SU-2023:0115-1","SUSE-SU-2023:0116-1","SUSE-SU-2023:0117-1","openSUSE-SU-2024:12638-1"],"references":[{"type":"ADVISORY","url":"http://packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.html"},{"type":"ADVISORY","url":"http://packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Modification.html"},{"type":"ADVISORY","url":"http://seclists.org/fulldisclosure/2023/Aug/21"},{"type":"ADVISORY","url":"https://support.apple.com/kb/HT213758"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00012.html"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202305-12"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20230127-0015/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2023/dsa-5321"},{"type":"ADVISORY","url":"http://packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.html"},{"type":"ARTICLE","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2QDGFCGAV5QRJCE6IXRXIS4XJHS57DDH/"},{"type":"ARTICLE","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G4YNBTTKTRT2ME3NTSXAPTOKYUE47XHZ/"},{"type":"EVIDENCE","url":"http://www.openwall.com/lists/oss-security/2023/01/19/1"},{"type":"EVIDENCE","url":"https://www.sudo.ws/security/advisories/sudoedit_any/"},{"type":"EVIDENCE","url":"https://www.synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdf"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/millert/sudo","events":[{"introduced":"4333b06914558093a327ee445699c479a57933a4"},{"fixed":"c684bf08307b3270a62f2130bafb37c36aa3c99e"},{"introduced":"0"},{"last_affected":"c684bf08307b3270a62f2130bafb37c36aa3c99e"},{"introduced":"0"},{"last_affected":"7a103879a054ec428dd8ed9b4cee8077102900ec"}],"database_specific":{"versions":[{"introduced":"1.8.0"},{"fixed":"1.9.12"},{"introduced":"0"},{"last_affected":"1.9.12-NA"},{"introduced":"0"},{"last_affected":"1.9.12-p1"}]}}],"versions":["SUDO_1_3_0","SUDO_1_3_1","SUDO_1_4_0","SUDO_1_5_0","SUDO_1_5_1","SUDO_1_5_2","SUDO_1_5_3","SUDO_1_5_4","SUDO_1_5_6","SUDO_1_5_7","SUDO_1_5_8","SUDO_1_5_9","SUDO_1_6_0","SUDO_1_6_1","SUDO_1_6_2","SUDO_1_6_3","SUDO_1_6_4","SUDO_1_6_5","SUDO_1_6_6","SUDO_1_6_7","SUDO_1_6_8","SUDO_1_6_8p1","SUDO_1_7_0","SUDO_1_7_1","SUDO_1_7_10","SUDO_1_7_10p1","SUDO_1_7_10p2","SUDO_1_7_10p3","SUDO_1_7_10p4","SUDO_1_7_10p5","SUDO_1_7_10p6","SUDO_1_7_10p7","SUDO_1_7_10p8","SUDO_1_7_10p9","SUDO_1_7_2","SUDO_1_7_3","SUDO_1_7_4","SUDO_1_7_5","SUDO_1_7_6","SUDO_1_7_7","SUDO_1_7_8","SUDO_1_7_9","SUDO_1_7_9p1","SUDO_1_8_0","SUDO_1_8_1","SUDO_1_8_10","SUDO_1_8_10p1","SUDO_1_8_10p2","SUDO_1_8_10p3","SUDO_1_8_11","SUDO_1_8_11p1","SUDO_1_8_11p2","SUDO_1_8_12","SUDO_1_8_13","SUDO_1_8_14","SUDO_1_8_14p1","SUDO_1_8_14p3","SUDO_1_8_15","SUDO_1_8_16","SUDO_1_8_17","SUDO_1_8_17p1","SUDO_1_8_18","SUDO_1_8_18p1","SUDO_1_8_19","SUDO_1_8_19p1","SUDO_1_8_19p2","SUDO_1_8_2","SUDO_1_8_20","SUDO_1_8_20p1","SUDO_1_8_20p2","SUDO_1_8_21","SUDO_1_8_21p1","SUDO_1_8_21p2","SUDO_1_8_22","SUDO_1_8_23","SUDO_1_8_24","SUDO_1_8_25","SUDO_1_8_25p1","SUDO_1_8_26","SUDO_1_8_27","SUDO_1_8_28","SUDO_1_8_28p1","SUDO_1_8_29","SUDO_1_8_3","SUDO_1_8_30","SUDO_1_8_31","SUDO_1_8_31p1","SUDO_1_8_31p2","SUDO_1_8_32","SUDO_1_8_4","SUDO_1_8_4p1","SUDO_1_8_4p2","SUDO_1_8_4p3","SUDO_1_8_4p4","SUDO_1_8_4p5","SUDO_1_8_5","SUDO_1_8_5p1","SUDO_1_8_5p2","SUDO_1_8_5p3","SUDO_1_8_6","SUDO_1_8_6p1","SUDO_1_8_6p2","SUDO_1_8_6p3","SUDO_1_8_6p4","SUDO_1_8_6p5","SUDO_1_8_6p6","SUDO_1_8_6p7","SUDO_1_8_6p8","SUDO_1_8_7","SUDO_1_8_8","SUDO_1_8_9","SUDO_1_8_9p1","SUDO_1_8_9p2","SUDO_1_8_9p3","SUDO_1_8_9p4","SUDO_1_8_9p5","SUDO_1_9_0","SUDO_1_9_1","SUDO_1_9_10","SUDO_1_9_11","SUDO_1_9_11p1","SUDO_1_9_11p2","SUDO_1_9_11p3","SUDO_1_9_2","SUDO_1_9_3","SUDO_1_9_3p1","SUDO_1_9_4","SUDO_1_9_4p1","SUDO_1_9_4p2","SUDO_1_9_5","SUDO_1_9_5p1","SUDO_1_9_5p2","SUDO_1_9_6","SUDO_1_9_6p1","SUDO_1_9_7","SUDO_1_9_7p1","SUDO_1_9_7p2","SUDO_1_9_8","SUDO_1_9_8p1","SUDO_1_9_8p2","SUDO_1_9_9","TAG"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-22809.json","unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"10.0"}]},{"events":[{"introduced":"0"},{"last_affected":"11.0"}]},{"events":[{"introduced":"0"},{"last_affected":"36"}]},{"events":[{"introduced":"0"},{"last_affected":"37"}]},{"events":[{"introduced":"0"},{"fixed":"13.4"}]}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}