REDHAT-BUG-2451615: Race Condition

Published Mar 26, 2026
·
Updated

A time-of-check-to-time-of-use (TOCTOU) race condition in libcap’s cap_set_file() allows a local unprivileged user to redirect file capability updates to an attacker‑controlled file and gain elevated privileges. The function first validates the target path with lstat() (which does not follow symlinks) and enforces that it is a regular, non‑symlink file, but then applies or removes security.capability using setxattr() / removexattr(), which re-resolve the path and do follow symlinks. An attacker with write access to the parent directory can exploit the window between these calls by atomically swapping the validated regular file with a symlink or alternate file using renameat2(RENAME_EXCHANGE). As a result, capabilities can be injected into or stripped from an unintended executable, for example when a privileged process (such as setcap, package scripts, or container tooling) invokes cap_set_file() on an attacker-influenced path. This can be abused to grant capabilities like CAP_SETUID to an attacker’s binary and escalate to root.

Affected Software

1 affected component
libcap libcap

Event History

Mar 26, 2026
Data Sourced
via Red Hat·06:56 AM
DescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2451615?

The severity of REDHAT-BUG-2451615 is considered to be high due to its potential for privilege escalation.

2

How do I fix REDHAT-BUG-2451615?

To mitigate REDHAT-BUG-2451615, it is recommended to apply security patches provided by your system vendor.

3

Who is affected by REDHAT-BUG-2451615?

Local unprivileged users of the libcap library are affected by REDHAT-BUG-2451615.

4

What causes REDHAT-BUG-2451615?

REHAT-BUG-2451615 is caused by a time-of-check-to-time-of-use race condition in the cap_set_file() function.

5

Can REDHAT-BUG-2451615 lead to system compromise?

Yes, REDHAT-BUG-2451615 can lead to system compromise by allowing attackers to gain elevated privileges.

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