CVE-2021-23240
JSON

7.8high

selinuxeditcopytfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges by r…

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
1.08% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
sudo_project sudobefore 1.8.32, from 1.9.0 before 1.9.5NVD
netapp hci_management_nodeNot specifiedNVD
netapp solidfireNot specifiedNVD
fedoraproject fedora32, 33NVD

All scores

NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD4.4medium CVSS:2.0AV:L/AC:M/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

NVD (es)

En la función selinux_edit_copy_tfiles en sudoedit en Sudo versiones anteriores a la 1.9.5, permite a un usuario local poco privilegiado obtener una propiedad del archivo y escalar unos privilegios reemplazando un archivo temporal con un enlace simbólico para un archivo objetivo arbitrario. Esto afecta el soporte de SELinux RBAC en modo permisivo. Las máquinas sin SELinux no son vulnerables

References

https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240exploit, issue-tracking, patch, third-party-advisory
https://www.sudo.ws/stable.html#1.9.5release-notes, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EE42Y35SMJOLONAIBNYNFC7J44UUZ2Y6/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GMY4VSSBIND7VAYSN6T7XIWJRWG4GBB3/vendor-advisory
https://security.gentoo.org/glsa/202101-33third-party-advisory, vendor-advisory
https://security.netapp.com/advisory/ntap-20210129-0010/third-party-advisory
https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3Emailing-list
https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3Emailing-list

Sources

SourceRecordLicence
CVE ListCVE-2021-23240 changed 2024-08-03CVE Terms of Use
NVDCVE-2021-23240 changed 2026-06-17Public domain