CVE-2026-4878: Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()
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 `cap_set_file()` 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.
Security readout for executives and security teams
Plain-English summary
This is a local privilege escalation flaw in libcap on listed Red Hat platforms. An attacker already on a system may misuse a race condition during file capability changes to alter the wrong executable’s privileges. It is not remotely exploitable from the network based on the provided data.
Executive priority
Treat as a scheduled but important patching item. It requires local access and a difficult race, reducing urgency versus remote flaws, but successful exploitation could compromise system integrity and confidentiality on high-value Linux hosts.
Technical view
CVE-2026-4878 is a CWE-367 TOCTOU race in libcap’s cap_set_file(). A low-privileged local user with write access to a parent directory may redirect capability updates to an attacker-controlled or unintended file, allowing capabilities to be injected or stripped and potentially escalating privileges.
Likely exposure
Exposure is likely on affected Red Hat Enterprise Linux 8, 9, and 10 systems and affected OpenShift Container Platform 4.13 through 4.17 RHCOS nodes that include the listed libcap or rhcos builds.
Exploitation context
The source data rates this CVSS 6.7 with local attack vector, high complexity, low privileges, and user interaction required. KEV is false, and the bundle provides no evidence of active exploitation or public weaponization.
Researcher notes
The key condition is attacker write access to a parent directory while cap_set_file() operates on a target path. The bundle does not provide proof-of-concept details, exploit telemetry, or non-Red Hat affected product confirmation.
Mitigation direction
Identify affected RHEL and OpenShift versions against the listed libcap and rhcos builds.
Apply the relevant Red Hat RHSA updates for each supported product stream.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-367: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references privilege impact, so privilege escalation and authorization behavior review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
7Timeline events
3ADP providers
35Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.