CVE-2021-23240

Exp

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.

Published: 2021-01-12 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-23240 is rated Exploit Available (57.7/100): CVSS High severity, with low exploitation likelihood (EPSS 0.22%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-23240

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-23240

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-03-30 3.25% 0.22% -3.03%
2 2025-03-29 0.22% 3.25% +3.03%
3 2025-03-17 0.22%

Full EPSS history (10 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-23240

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]
4.4 2.0 MEDIUM
AV:L/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:L)
Requires local access to the target system.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
3.4 6.4 [email protected]

Weakness enumeration for CVE-2021-23240

OS Trackers for CVE-2021-23240

vendor priority summary link
alpine high CVE-2021-23240: 1 source package rows (sudo); 22 state rows across 11 repos (3.10-main, 3.11-main, 3.12-main, 3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community, edge-main); fixed 11, open 11. https://security.alpinelinux.org/vuln/CVE-2021-23240
debian unimportant CVE-2021-23240 unimportant priority: Debian including 1 source packages (sudo), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-23240
gentoo high CVE-2021-23240: 1 GLSA(s) (202101-33), 1 atom(s) (app-admin/sudo); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-23240
redhat medium https://access.redhat.com/security/cve/CVE-2021-23240
suse high CVE-2021-23240 severity important: SUSE including 284 source package names (1.1.1.0.1.5.424:sudo-1.8.22-4.15.1, 1.2.0.0.1.5.430:sudo-1.8.22-4.15.1, …), 366 product×package rows across 90 product lines (Container ses/6/cephcsi/cephcsi, Container ses/6/rook/ceph, … (90 product lines)): Fixed 232, Known Affected 124, Known Not Affected 10. https://www.suse.com/security/cve/CVE-2021-23240/
ubuntu negligible CVE-2021-23240 negligible priority: Ubuntu including 1 source packages (sudo), 16 status rows across 16 suites (bionic, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): not-affected 9, ignored 3, needs-triage 3, released 1. https://ubuntu.com/security/CVE-2021-23240

Affected software / configurations for CVE-2021-23240

Vendor Product Version Raw CPE
sudo_project sudo < 1.8.32 cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
sudo_project sudo >= 1.9.0, < 1.9.5 cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
netapp hci_management_node cpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:*
netapp solidfire cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*
fedoraproject fedora 32 cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
fedoraproject fedora 33 cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*

References for CVE-2021-23240

URL Tags
https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240 Exploit Issue Tracking Patch Third Party Advisory
https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E
https://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/EE42Y35SMJOLONAIBNYNFC7J44UUZ2Y6/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GMY4VSSBIND7VAYSN6T7XIWJRWG4GBB3/
https://security.gentoo.org/glsa/202101-33 Third Party Advisory
https://security.netapp.com/advisory/ntap-20210129-0010/ Third Party Advisory
https://www.sudo.ws/stable.html#1.9.5 Release Notes Vendor Advisory
cvelogic Threat Intelligence