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, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, 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)bullseye (security), bullseye1.9.5p2-3+deb11u1fixed
bookworm1.9.13p3-1+deb12u1fixed
sid, trixie1.9.16p1-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