{"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-08-12T03:51:22.064532036Z","published":"2023-01-18T00:00:00Z","related":["ALSA-2023:0282","ALSA-2023:0284","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"],"database_specific":{"cna_assigner":"mitre","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/22xxx/CVE-2023-22809.json","unresolved_ranges":[{"extracted_events":[{"fixed":"1.9.12p2"},{"introduced":"1.8.0"},{"fixed":"1.9.12.p1"}],"source":"DESCRIPTION"}]},"references":[{"type":"WEB","url":"http://packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.html"},{"type":"WEB","url":"http://packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.html"},{"type":"WEB","url":"http://packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Modification.html"},{"type":"WEB","url":"https://support.apple.com/kb/HT213758"},{"type":"WEB","url":"https://www.synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdf"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/22xxx/CVE-2023-22809.json"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2QDGFCGAV5QRJCE6IXRXIS4XJHS57DDH/"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/G4YNBTTKTRT2ME3NTSXAPTOKYUE47XHZ/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-22809"},{"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":"https://www.sudo.ws/security/advisories/sudoedit_any/"},{"type":"ARTICLE","url":"http://seclists.org/fulldisclosure/2023/Aug/21"},{"type":"ARTICLE","url":"http://www.openwall.com/lists/oss-security/2023/01/19/1"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00012.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/millert/sudo","events":[{"introduced":"4333b06914558093a327ee445699c479a57933a4"},{"fixed":"c684bf08307b3270a62f2130bafb37c36aa3c99e"},{"introduced":"c684bf08307b3270a62f2130bafb37c36aa3c99e"},{"last_affected":"7a103879a054ec428dd8ed9b4cee8077102900ec"}],"database_specific":{"extracted_events":[{"introduced":"1.8.0"},{"fixed":"1.9.12"},{"introduced":"1.9.12-NA"},{"last_affected":"1.9.12-NA"},{"introduced":"1.9.12-p1"},{"last_affected":"1.9.12-p1"}],"source":["CPE_RANGE","CPE_STRING"],"cpe":["cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*","cpe:2.3:a:sudo_project:sudo:1.9.12:-:*:*:*:*:*:*","cpe:2.3:a:sudo_project:sudo:1.9.12:p1:*:*:*:*:*:*"]}}],"versions":["1.9.12-NA","1.9.12-p1","SUDO_1_9_12p1","SUDO_1_9_12","SUDO_1_9_11p3","SUDO_1_9_11p2","SUDO_1_9_11p1","SUDO_1_9_11","SUDO_1_9_10","SUDO_1_9_9","SUDO_1_9_8p2","SUDO_1_9_8p1","SUDO_1_9_8","SUDO_1_9_7p2","SUDO_1_9_7p1","SUDO_1_9_7","SUDO_1_9_6p1","SUDO_1_9_6","SUDO_1_9_5p2","SUDO_1_9_5p1","SUDO_1_9_5","SUDO_1_9_4p2","SUDO_1_9_4p1","SUDO_1_9_4","SUDO_1_9_3p1","SUDO_1_9_3","SUDO_1_9_2","SUDO_1_9_1","SUDO_1_9_0","SUDO_1_8_0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-22809.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/sudo-project/sudo","events":[{"introduced":"4333b06914558093a327ee445699c479a57933a4"},{"fixed":"c684bf08307b3270a62f2130bafb37c36aa3c99e"},{"introduced":"c684bf08307b3270a62f2130bafb37c36aa3c99e"},{"last_affected":"7a103879a054ec428dd8ed9b4cee8077102900ec"}],"database_specific":{"extracted_events":[{"introduced":"1.8.0"},{"fixed":"1.9.12"},{"introduced":"1.9.12-NA"},{"last_affected":"1.9.12-NA"},{"introduced":"1.9.12-p1"},{"last_affected":"1.9.12-p1"}],"source":["CPE_RANGE","CPE_STRING"],"cpe":["cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*","cpe:2.3:a:sudo_project:sudo:1.9.12:-:*:*:*:*:*:*","cpe:2.3:a:sudo_project:sudo:1.9.12:p1:*:*:*:*:*:*"]}}],"versions":["1.9.12-NA","1.9.12-p1","v1.9.12p1","SUDO_1_9_12p1","v1.9.12","SUDO_1_9_12","v1.9.11p3","SUDO_1_9_11p3","v1.9.11p2","SUDO_1_9_11p2","v1.9.11p1","SUDO_1_9_11p1","v1.9.11","SUDO_1_9_11","v1.9.10","SUDO_1_9_10","v1.9.9","SUDO_1_9_9","v1.9.8p2","SUDO_1_9_8p2","v1.9.8p1","SUDO_1_9_8p1","v1.9.8","SUDO_1_9_8","v1.9.7p2","SUDO_1_9_7p2","v1.9.7p1","SUDO_1_9_7p1","v1.9.7","SUDO_1_9_7","v1.9.6p1","SUDO_1_9_6p1","v1.9.6","SUDO_1_9_6","v1.9.5p2","SUDO_1_9_5p2","v1.9.5p1","SUDO_1_9_5p1","v1.9.5","SUDO_1_9_5","v1.9.4p2","SUDO_1_9_4p2","v1.9.4p1","SUDO_1_9_4p1","v1.9.4","SUDO_1_9_4","v1.9.3p1","SUDO_1_9_3p1","v1.9.3","SUDO_1_9_3","v1.9.2","SUDO_1_9_2","v1.9.1","SUDO_1_9_1","v1.9.0","SUDO_1_9_0","v1.8.0","SUDO_1_8_0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-22809.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}