CVEfocus › CVE database › CVE-2021-23240

CVE-2021-23240

CVSS 7.8 HighEPSS 1.1% (higher than 65% of CVEs)Published 2021-01-12Updated 2024-08-03Assigner: mitre

selinux_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.

What to do

Fixed builds are available from Alpine, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

20Fixed
4Fix pending
5Will not fix
6Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04sudoNot affected
vulnerable_code_not_present
Ubuntu 25.10sudoNot affected
vulnerable_code_not_present
Ubuntu 24.04sudoNot affected
vulnerable_code_not_present
Ubuntu 22.04sudoNot affected
vulnerable_code_not_present
Ubuntu 20.04sudoFix pendingUBUNTU-CVE-2021-23240
Ubuntu 18.04sudoFix pendingUBUNTU-CVE-2021-23240
Ubuntu 16.04sudoFix pendingUBUNTU-CVE-2021-23240
Ubuntu 14.04sudoFix pendingUBUNTU-CVE-2021-23240
Debian 14sudoFixed1.9.5-1DEBIAN-CVE-2021-23240
Debian 13sudoFixed1.9.5-1DEBIAN-CVE-2021-23240
Debian 12sudoFixed1.9.5-1DEBIAN-CVE-2021-23240
Red Hat Enterprise Linux 9sudoNot affected
Red Hat Enterprise Linux 9sudo-python-pluginNot affected
Red Hat Enterprise Linux 8sudoFixed0:1.8.29-7.el8RHSA-2021:1723
Red Hat Enterprise Linux 7sudoWill not fix
Out of support scope
Red Hat Enterprise Linux 7sudo-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6sudoWill not fix
Out of support scope
Red Hat Enterprise Linux 6sudo-develWill not fix
Out of support scope
Red Hat Enterprise Linux 5sudoWill not fix
Out of support scope
Rocky Linux 8sudoFixed0:1.8.29-7.el8RLSA-2021:1723
Alpine Linux 3.24sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.23sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.22sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.21sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.20sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.19sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.18sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.17sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.16sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.15sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.14sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.13sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.12sudoFixed1.9.5-r0ALPINE-CVE-2021-23240
Alpine Linux 3.11sudoFixed1.9.5p2-r0ALPINE-CVE-2021-23240
Alpine Linux 3.10sudoFixed1.9.5p2-r0ALPINE-CVE-2021-23240

What the vendor says

As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.