CVE-2021-23240
sudo: symbolic link attack in SELinux-enabled sudoedit
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · January 11, 2021
Updated · April 30, 2026
Description
A race condition vulnerability was found in the temporary file handling of sudoedit's SELinux RBAC support. On systems where SELinux is enabled, this flaw allows a malicious user with sudoedit permissions to set the owner of an arbitrary file to the user ID of the target user, potentially leading to local privilege escalation. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
Statement
SELinux enforcing mode is the default and recommended mode of operation in Red Hat Enterprise Linux. Moreover, the symbolic link protection is enabled by default, thus preventing this issue from being exploited. Therefore, this flaw has been rated as having a security impact of Low for Red Hat Enterprise Linux.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
- Enable SELinux in enforcing mode.
- Enable the symbolic link protection (/proc/sys/fs/protected_symlinks set to 1).
- Remove the
seshbinary (/usr/libexec/sudo/sesh or /usr/lib/sudo/sesh) if SELinux RBAC support is not needed.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-367 · Time-of-check Time-of-use (TOCTOU) Race Condition