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, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
NVD severitymedium

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
sudo (PTS)stretch (security), stretch1.8.19p1-2.1+deb9u2vulnerable
buster1.8.27-1+deb10u2vulnerable
buster (security)1.8.27-1+deb10u1vulnerable
bullseye1.9.4p2-2vulnerable
sid1.9.5p1-1fixed

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