Sudo: Improper Privilege Management
CVE-2023-22809 is a high-severity improper privilege management vulnerability in Sudo from Sudo Project, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists version 1.9.12 as the first without the flaw, so updating Sudo to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 55.4% chance of exploitation within 30 days, which is in the top 0.95% of all scored CVEs.
Exploitation in the next 30 days is more likely than not, according to EPSS.
What to do
- Update Sudo to 1.9.12 or a later version.
- Update macOS to 13.4 or a later version.
- Read the advisory on sudo.ws for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Sudo Project | Sudo | 1.8.0 up to, but not including, 1.9.12; 1.9.12 | 1.9.12 |
| Debian | Debian Linux | 10.0; 11.0 | Not stated |
| Fedora Project | Fedora | 36; 37 | Not stated |
| Apple | macOS | before 13.4 | 13.4 |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Privilege Management
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.
How developers prevent this class of flaw
- Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Follow the principle of least privilege when assigning access rights to entities in a software system.
- Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.
More Improper Privilege Management vulnerabilities (CWE-269)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- sudo.ws/security/advisories/sudoedit_any/Exploit, Mitigation
Patches and release notes
- synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdfExploit, Mitigation, Technical Description, Third Party Advisory
Third-party and government advisories
- packetstormsecurity.com/files/171644/sudo-1.9.12p1-Privilege-Escalation.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/172509/Sudoedit-Extra-Arguments-Privilege-Escalation.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/174234/Cisco-ThousandEyes-Enterprise-Agent-Virtual-Appliance-Arbitrary-File-Mod…Third Party Advisory, VDB Entry
- seclists.org/fulldisclosure/2023/Aug/21Mailing List, Third Party Advisory
- lists.debian.org/debian-lts-announce/2023/01/msg00012.htmlMailing List, Third Party Advisory
- security.gentoo.org/glsa/202305-12Third Party Advisory
- security.netapp.com/advisory/ntap-20230127-0015/Third Party Advisory
- support.apple.com/kb/HT213758Third Party Advisory
- debian.org/security/2023/dsa-5321Third Party Advisory
Technical write-ups (may include proof of concept)
- openwall.com/lists/oss-security/2023/01/19/1Exploit, Mailing List, Third Party Advisory
Other references
Other vulnerabilities in Sudo
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 8.8 High severity
- 7.1 High severity
- 7.8 High severity
Sudo Heap-Based Buffer Overflow Exploited
Recent Improper Privilege Management vulnerabilities
- 8.8 High severity
- 8.8 High severity
- 7.8 High severity
- 9.8 Critical severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.