CVE-2021-23240

NameCVE-2021-23240
Descriptionselinux_edit_copy_tfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges by replacing a temporary file with a symlink to an arbitrary file target. This affects SELinux RBAC support in permissive mode. Machines without SELinux are not vulnerable.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
sudo (PTS)jessie, jessie (lts)1.8.10p3-1+deb8u9vulnerable
stretch (security)1.8.19p1-2.1+deb9u3vulnerable
stretch (lts), stretch1.8.19p1-2.1+deb9u6vulnerable
buster1.8.27-1+deb10u3vulnerable
buster (security)1.8.27-1+deb10u6vulnerable
bullseye (security), bullseye1.9.5p2-3+deb11u1fixed
bookworm1.9.13p3-1+deb12u1fixed
sid, trixie1.9.15p5-3fixed

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
sudosource(unstable)1.9.5-1unimportant

Notes

https://www.openwall.com/lists/oss-security/2021/01/11/2
https://www.sudo.ws/repos/sudo/rev/8fcb36ef422a
https://www.sudo.ws/alerts/sudoedit_selinux.html
Neutralised by kernel hardening (fs.protected_symlinks = 1)

Search for package or bug name: Reporting problems