Patchfirst
CVE-2023-22809 Public exploit High · 7.8 EPSS 55.4%

In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided…

No fixed version listed yet.Check the vendor advisory. References ↓

Summary

In Sudo versions 1.8.0 through 1.9.12p1, the sudoedit (-e) feature mishandles extra arguments supplied through the SUDO_EDITOR, VISUAL, and EDITOR environment variables, because a user-specified editor containing a "--" argument can defeat the protection that restricts which files are processed. A local attacker with low privileges and no user interaction can exploit this by appending arbitrary entries to the list of files to be edited, which can lead to privilege escalation.

Official description · CVE.org

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.

Breakdown
66.4 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 23 months after disclosure. Public exploit code (Metasploit) was available the same day.

  1. DisclosedPublic exploit codeMetasploitday 0
  2. First seen exploitedVulnCheck KEV evidence+23 mo
↑ ↓ chooseEnter openEsc close