Skip to content

CVE-2023-22809 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 appe...

HighCVSS 7.8 EPSS 55.4% Framework module Public exploit
Published
Updated
Exploit status
Public exploit available

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.

Affected products

ProductAffected versionsFixed in
debian/sudo(Debian:12) < 1.9.12p2-1 1.9.12p2-1
debian/sudo(Debian:13) < 1.9.12p2-1 1.9.12p2-1
debian/sudo(Debian:14) < 1.9.12p2-1 1.9.12p2-1
ubuntu/sudo(Ubuntu:22.04) < 1.9.9-1ubuntu2.2 1.9.9-1ubuntu2.2
sudo project sudo >= 1.8.0, < 1.9.12 1.9.12
sudo project sudo = 1.9.12 No fix listed
sudo project sudo = 1.9.12-p1 No fix listed
debian linux = 10.0 No fix listed
debian linux = 11.0 No fix listed
fedoraproject fedora = 36 No fix listed
fedoraproject fedora = 37 No fix listed
apple macos < 13.4 13.4
alpine/sudo(Alpine:v3.14) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.15) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.17) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.18) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.19) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.20) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.21) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.22) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.23) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0
alpine/sudo(Alpine:v3.24) >= 1.8.0, < 1.9.12_p2-r0 1.9.12_p2-r0

References