Skip to content
Fencer Vulns
high 7.8

CVE-2021-23240 json

selinux_edit_copy_tfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges b…

published 2021-01-12 5 y ago modified 2026-06-17 4 mo ago also EUVD-2021-10339

cvss
7.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.1%
EPSS 1.1% chance of exploitation in 30 days, percentile 65%
public exploits
0
none known

Summary

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.

Patch / fix

  • sudo_project sudo 1.8.32, 1.9.5
  • sudo Debian 14, Debian 13, Debian 12 1.9.5-1

debian advisories DEBIAN-CVE-2021-23240

  • sudo RHEL 8 1.8.29-7.el8

red hat advisories RHSA-2021:1723

  • sudo SLES for SAP 15 SP1, SLES for SAP 15, SLES 15-LTSS +12 more 1.8.22-4.15.1
  • sudo SLES for SAP 12 SP4, SLES for SAP 12 SP3, SLES 12 SP4-LTSS +8 more 1.8.20p2-3.20.1
  • sudo SLES for SAP 12 SP5, SLES 12 SP5, SLE Software Development Kit 12 SP5 1.8.27-4.6.1

suse advisories SUSE-SU-2021:0227-1SUSE-SU-2021:0226-1SUSE-SU-2021:0225-1

  • sudo openSUSE Tumbleweed 1.9.7p2-1.4
  • sudo openSUSE Leap 15.2 1.8.22-lp152.8.6.1
  • sudo openSUSE Leap 15.1 1.8.22-lp151.5.12.1

opensuse advisories openSUSE-SU-2024:11413-1openSUSE-SU-2021:0170-1openSUSE-SU-2021:0169-1

  • sudo Rocky Linux 8 1.8.29-7.el8

rocky linux advisories RLSA-2021:1723

  • sudo Alpine 3.11, Alpine 3.10 1.9.5p2-r0
  • sudo Alpine 3.24, Alpine 3.23, Alpine 3.22 +10 more 1.9.5-r0

alpine advisories ALPINE-CVE-2021-23240

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-23240 updated cvss 7.8

sudo: symbolic link attack in SELinux-enabled sudoedit

  • Red Hat Enterprise Linux 5 sudo Red Hat Enterprise Linux 6 sudo Red Hat Enterprise Linux 7 sudo
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux BaseOS (v. 8) sudo 1.8.29-7.el8
    fixed: vendor fix RHSA-2021:1723
  • Red Hat Enterprise Linux 9 sudo, sudo-python-plugin
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.08% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • bugzilla.suse.com https://bugzilla.suse.com/show_bug.cgi?id=CVE-2021-23240 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 4.4 AV:L/AC:M/Au:N/C:P/I:P/A:P

Classification

Weakness
  • CWE-59 Improper Link Resolution Before File Access

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.