CVE-2023-22809

NameCVE-2023-22809
DescriptionIn 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3272-1, DSA-5321-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
sudo (PTS)buster1.8.27-1+deb10u3vulnerable
buster (security)1.8.27-1+deb10u5fixed
bullseye1.9.5p2-3vulnerable
bullseye (security)1.9.5p2-3+deb11u1fixed
bookworm, sid1.9.12p2-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
sudosourcebuster1.8.27-1+deb10u5DLA-3272-1
sudosourcebullseye1.9.5p2-3+deb11u1DSA-5321-1
sudosource(unstable)1.9.12p2-1

Notes

https://www.sudo.ws/security/advisories/sudoedit_any/
https://github.com/sudo-project/sudo/commit/0274a4f3b403162a37a10f199c989f3727ed3ad4
https://www.synacktiv.com/sites/default/files/2023-01/sudo-CVE-2023-22809.pdf
https://www.openwall.com/lists/oss-security/2023/01/19/1

Search for package or bug name: Reporting problems