# CVE-2021-23240

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-01-12 · Modified: 2024-08-03
- Aliases: ALPINE-CVE-2021-23240, UBUNTU-CVE-2021-23240, DEBIAN-CVE-2021-23240
- Record: https://cvemate.com/vulnerability/CVE-2021-23240 · JSON: https://cvemate.com/vulnerability/CVE-2021-23240/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 1.079%, percentile 66.219%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- alpine sudo (Alpine Linux): ≥ 1.9.0, \< 1.9.5p2-r0 \| ≥ 1.9.0, \< 1.9.5-r0
- debian sudo (Debian): \< 1.9.5-1
- ubuntu sudo (Ubuntu): All versions (No fix recorded)
- fedoraproject fedora: 32 \| 33
- netapp hci\_management\_node: na
- netapp solidfire: na
- sudo\_project sudo: \< 1.8.32 \| ≥ 1.9.0, \< 1.9.5

## References

- <https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240>
- <https://www.sudo.ws/stable.html#1.9.5>
- <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://lists.apache.org/thread.html/rf4c02775860db415b4955778a131c2795223f61cb8c6a450893651e4%40%3Cissues.bookkeeper.apache.org%3E>
- <https://lists.apache.org/thread.html/r58af02e294bd07f487e2c64ffc0a29b837db5600e33b6e698b9d696b%40%3Cissues.bookkeeper.apache.org%3E>
- <https://security.alpinelinux.org/vuln/CVE-2021-23240>
- <https://ubuntu.com/security/CVE-2021-23240>
- <https://www.openwall.com/lists/oss-security/2021/01/11/2>
- <https://www.sudo.ws/alerts/sudoedit_selinux.html>
- <https://www.cve.org/CVERecord?id=CVE-2021-23240>
- <https://security-tracker.debian.org/tracker/CVE-2021-23240>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23240>

---

Data as of 2026-12-05T02:38:14.534Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
