CVE-2021-23240: High severity Sudo Project Sudo vulnerability

Published Jan 11, 2021
·
Updated

A flaw in the temporary file handling of sudoedit's SELinux RBAC support was found in versions of sudo before 1.9.5. On systems where SELinux is enabled, a user with sudoedit permissions may be able to set the owner of an arbitrary file to the user-ID of the target user.

Other sources

selinuxeditcopytfiles 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.

— MITRE

Affected Software

26 affected componentsFixes available
Sudo Project Sudo<1.8.32
Sudo Project Sudo>=1.9.0<1.9.5
NetApp Hci Management Node
NetApp Solidfire
Fedoraproject Fedora=32
Fedoraproject Fedora=33
alpine/sudo>=1.9.0<1.9.5p2-r0
1.9.5p2-r0
alpine/sudo>=1.9.0<1.9.5p2-r0
1.9.5p2-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
alpine/sudo>=1.9.0<1.9.5-r0
1.9.5-r0
ubuntu/sudo*
ubuntu/sudo*
ubuntu/sudo*
ubuntu/sudo*
redhat/sudo<1.9.5
1.9.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade alpine/sudo to a version that resolves this vulnerability.

    Fixed in 1.9.5p2-r0
  2. Upgrade

    Upgrade alpine/sudo to a version that resolves this vulnerability.

    Fixed in 1.9.5-r0
  3. Upgrade

    Upgrade redhat/sudo to a version that resolves this vulnerability.

    Fixed in 1.9.5
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.9.5

Event History

Jan 11, 2021
Data Sourced
via Red Hat·08:30 PM
DescriptionSeverityAffected Software
Jan 12, 2021
CVE Published
via MITRE·08:17 AM
Data Sourced
via MITRE·08:17 AM
Description
Data Sourced
via OSV·09:15 AM
DescriptionSeverityAffected Software
Data Sourced
09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is CVE-2021-23240?

CVE-2021-23240 is a vulnerability in sudoedit in Sudo before 1.9.5 that allows a local unprivileged user to gain file ownership and escalate privileges.

2

How does CVE-2021-23240 affect SELinux RBAC support in permissive mode?

CVE-2021-23240 affects SELinux RBAC support in permissive mode by allowing the user to replace a temporary file with a symlink to an arbitrary file target, gaining file ownership and escalating privileges.

3

Which versions of Sudo are affected by CVE-2021-23240?

Versions of Sudo before 1.9.5 are affected by CVE-2021-23240.

4

Are machines without SELinux affected by CVE-2021-23240?

Machines without SELinux are not affected by CVE-2021-23240.

5

What is the severity of CVE-2021-23240?

CVE-2021-23240 has a severity rating of 7.8 (high).

6

What is the Common Weakness Enumeration (CWE) ID for CVE-2021-23240?

The Common Weakness Enumeration (CWE) ID for CVE-2021-23240 is 59.

7

Where can I find more information about CVE-2021-23240?

You can find more information about CVE-2021-23240 at the following references: [1] [2] [3]

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203