Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
7.8

CVE-2023-22809: Sudo lets local user add files and gain rights

CVE-2023-22809 · published 3 years ago
Summary

The sudo command on Linux systems (versions 1.8.0 through 1.9.12p1) can be tricked by a user’s own editor settings to process extra files. An attacker with local access could cause sudo to edit files they choose, potentially giving them higher privileges. Update sudo to a version newer than 1.9.12p2 or apply the vendor’s patch to stop this behavior.

What to do
  • Update debian sudo to version 1.9.12p2-1.
  • Update sudo to version 1.9.12_p2-r0.
  • Update sudo_project sudo to version 1.9.12 or later.
  • Update apple macos to version 13.4 or later.
Affected software
Ecosystem VendorProductAffected versions
Debian:12 debian sudo < 1.9.12p2-1
Fix: upgrade to 1.9.12p2-1
Debian:13 debian sudo < 1.9.12p2-1
Fix: upgrade to 1.9.12p2-1
Debian:14 debian sudo < 1.9.12p2-1
Fix: upgrade to 1.9.12p2-1
Alpine:v3.14 – sudo >= 1.8.0, < 1.9.12_p2-r0
Fix: upgrade to 1.9.12_p2-r0
– sudo_project sudo >= 1.8.0, < 1.9.12
1.9.12
cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
– debian debian_linux 10.0
11.0
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
– fedoraproject fedora 36
37
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
– apple macos < 13.4
cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*
Original advisory 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 a...
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.
Fix within
Internet-facing 14 days
Internal At next upgrade
  • Not known to be exploited
  • Needs hands-on effort to exploit
  • Gives an attacker full control
Severity
7.8 High
Exploitation
55% chance of attack within 30 days
Type
CWE-269Improper Privilege Management
Timeline
Published18 Jan 2023
Updated21 Oct 2026
First seen15 Sep 2026
Sources
CVE-2023-22809 · NVD
Track software like this
Free during beta