CVE-2021-23240
CVE-2021-23240 is a high-severity vulnerability in Sudo Project Sudo with a CVSS 3.x base score of 7.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-59.
Key facts
- Severity: High (CVSS 3.x base score 7.8)
- CVSS v2: 4.4
- EPSS exploit prediction: 1% (61st percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-59
- Affected product: Sudo Project Sudo
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2021-23240?
- 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.
- How severe is CVE-2021-23240?
- CVE-2021-23240 has a CVSS 3.x base score of 7.8, rated high severity. It is exploitable over local access with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2021-23240 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (61st percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-23240?
- CVE-2021-23240 primarily affects Sudo Project Sudo. In total, 5 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-23240?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2021-23240 published?
- CVE-2021-23240 was published on 2021-01-12 and last updated on 2026-06-17.
References
- https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240
- 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
- https://security.netapp.com/advisory/ntap-20210129-0010/
- https://www.sudo.ws/stable.html#1.9.5
Affected products (5)
- cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
- cpe:2.3:a:netapp:hci_management_node:-:*:*:*:*:*:*:*
- cpe:2.3:a:netapp:solidfire:-:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
More vulnerabilities in Sudo Project Sudo
- CVE-2025-32463 — Critical (CVSS 9.3): Sudo before 1.9.17p1 allows local users to obtain root access because /etc/nsswitch.conf from a user-controlled…
- CVE-2019-14287 — High (CVSS 8.8): In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer account can bypass certain policy blacklists and…
- CVE-2017-1000368 — High (CVSS 8.2): Todd Miller's sudo version 1.8.20p1 and earlier is vulnerable to an input validation (embedded newlines) in the…
- CVE-2023-22809 — High (CVSS 7.8): In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided…
- CVE-2021-3156 — High (CVSS 7.8): Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows…
- CVE-2019-18634 — High (CVSS 7.8): In Sudo before 1.8.26, if pwfeedback is enabled in /etc/sudoers, users can trigger a stack-based buffer overflow in the…
All CVEs affecting Sudo Project Sudo →
Other CWE-59 (Improper Link Resolution Before File Access (Link Following)) vulnerabilities
- CVE-2024-37143 — Critical (CVSS 10.0): Dell PowerFlex appliance versions prior to IC 46.381.00 and IC 46.376.00, Dell PowerFlex rack versions prior to RCM…
- CVE-2024-28189 — Critical (CVSS 10.0): Judge0 is an open-source online code execution system. The application uses the UNIX chown command on an untrusted file…
- CVE-2024-28185 — Critical (CVSS 10.0): Judge0 is an open-source online code execution system. The application does not account for symlinks placed inside the…
- CVE-2022-22995 — Critical (CVSS 10.0): The combination of primitives offered by SMB and AFP in their default configuration allows the arbitrary writing of…
- CVE-2014-4480 — Critical (CVSS 10.0): Directory traversal vulnerability in afc in AppleFileConduit in Apple iOS before 8.1.3 and Apple TV before 7.0.3 allows…
- CVE-2002-2374 — Critical (CVSS 10.0): Unspecified vulnerability in pprosetup in Sun PatchPro 2.0 has unknown impact and attack vectors related to "unsafe use…
Browse all CWE-59 (Improper Link Resolution Before File Access (Link Following)) vulnerabilities →