CVE Tools

CVE-2026-4878

Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()

Published: Apr 9, 2026Updated: Jun 22, 2026 Sources: CVE List NVDCWE-367
6.7CVSSMEDIUM

Description

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.

CVSS Vector Breakdown

AV:LAC:HPR:LUI:RS:UC:HI:HA:H
Exploitability
AV:LAttack Vector
Local
AC:HAttack Complexity
High
PR:LPrivileges Required
Low
UI:RUser Interaction
Required
Scope
S:UScope
Unchanged
Impact
C:HConfidentiality
High
I:HIntegrity
High
A:HAvailability
High

Weaknesses

Affected Products

libcap projectoss-projectOSS Librariesaka libcap
redhatcommercialUSOperating Systemsaka red hat
red hatcommercialUSOperating Systemsaka red hat
and 22 more affected products View all →

Attack Graph

Products CVE Techniques Tactics

Click technique nodes to view MITRE ATT&CK details. Scroll to zoom, drag to pan.

Exploitability

Official Patch Available
Workaround Available

MITRE ATT&CK

1 technique
Privilege Escalation
View detailed technique mapping

References

and 27 more references View all →

Timeline

Published
Apr 9, 2026
Last Updated
Jun 22, 2026

Unlock Complete Vulnerability Intelligence

Get the full picture for CVE-2026-4878 and every CVE in our database. Create a free account — no credit card required.

Create Free Account
Plain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows