CVE-2023-22809
Reported by mitre · Published January 18, 2023
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| sudo | Amazon Linux | 1.8.23-10.amzn2.3.1 |
| macos | apple | 13.4 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| amazon:2 | sudo | 0 |
| n/a | n/a | * |
| amazon:2023 | sudo-python-plugin | 0 |
| amazon:2023 | sudo-devel | 0 |
| amazon:2023 | sudo-logsrvd | 0 |
| amazon:2 | sudo-devel | 0 |
| amazon:2023 | sudo | 0 |
| alpine | sudo | 0 |
Timeline
- Jan 18, 2023 CVE Published
- Jan 18, 2023 Metasploit Module
- Jan 19, 2023 EPSS Score (30 in total, the first dated here)
- Mar 19, 2023 VulnCheck XDB Entry (13 in total, the first dated here)
- Apr 3, 2023 PoC Published (4 in total, the first dated here)
- Dec 6, 2024 VulnCheck KEV Exploitation
- Apr 4, 2025 CVE Updated
- Mar 10, 2026 Distribution Patch (61 in total, the first dated here)
- Mar 10, 2026 Security Advisory (64 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-22809
vulnetix vdb fixes CVE-2023-22809
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-22809/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [debian-lts-announce] 20230118 [SECURITY] [DLA 3272-1] sudo security update mailing-list
- DSA-5321 vendor-advisory
- [oss-security] 20230119 CVE-2023-22809: Sudoedit can edit arbitrary files mailing-list
- FEDORA-2023-9078f609e6 vendor-advisory
- FEDORA-2023-298c136eee vendor-advisory
- GLSA-202305-12 vendor-advisory
- 20230817 KL-001-2023-003: Cisco ThousandEyes Enterprise Agent Virtual Appliance Arbitrary File Modification via sudoedit mailing-list
- CVE-2023-22809-sudoedit-privesc exploit
- CVE-2023-22809 exploit
- CVE-2023-22809-sudo-POC exploit
- patch_CVE-2023-22809 exploit
- CVE-2023-22809 exploit
- CVE-2023-22809 exploit
…and 6 more