Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-4878

libcap: libcap: Privilege escalation via TOCTOU race condition in cap_set_file() (important)
Back to all
CVE

CVE-2026-4878

libcap: libcap: Privilege escalation via TOCTOU race condition in cap_set_file() (important)

DOCUMENTATION: A flaw was found in libcap. A local unprivileged user can exploit a Time-of-check-to-time-of-use (TOCTOU) race condition in the capsetfile() function. This allows an attacker with write access to a parent directory to redirect file capability updates to an attacker-controlled file. By doing so, capabilities can be injected into or stripped from unintended executables, leading to privilege escalation. 

            STATEMENT: This is an Important flaw. A Time-of-Check-to-Time-of-Use (TOCTOU) race condition in libcap's capsetfile() allows a local unprivileged user to escalate privileges. An attacker with write access to a parent directory can exploit a narrow window during file capability updates to redirect capabilities to an attacker-controlled file. This can lead to the injection of elevated privileges into an unintended executable when privileged processes, such as setcap or container tooling, invoke capsetfile() on attacker-influenced paths.

            MITIGATION: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
6.7
-
3.1
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
C
H
U
-
C
H
U
-

Related Resources

No items found.

References

https://access.redhat.com/security/cve/CVE-2026-4878

Severity

0

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
0
EPSS Probability
0.00013%
EPSS Percentile
0.02392%
Introduced Version
0
Fix Available
0:2.48-6.el8_10.1,0:2.48-10.el9_8.1,0:2.48-10.el9_7.1,1:2.66-4+deb12u3,1:2.75-10+deb13u1,1:2.66-5ubuntu2.4,1:2.44-1ubuntu0.22.04.3,2.78-r0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading