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

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

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.

History

Thu, 09 Apr 2026 16:30:00 +0000


Thu, 09 Apr 2026 15:30:00 +0000

Type Values Removed Values Added
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.
Title Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()
First Time appeared Redhat
Redhat enterprise Linux
Redhat openshift
Weaknesses CWE-367
CPEs cpe:/a:redhat:openshift:4
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat openshift
References
Metrics cvssV3_1

{'score': 6.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-04-09T16:33:13.800Z

Reserved: 2026-03-26T06:32:41.308Z

Link: CVE-2026-4878

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-04-09T16:16:31.987

Modified: 2026-04-09T16:16:31.987

Link: CVE-2026-4878

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses