Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()
Summary
| CVE | CVE-2026-4878 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-04-09 16:16:31 UTC |
| Updated | 2026-06-27 08:16:45 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 7 HIGH from [email protected]
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS: 0.001880000 probability, percentile 0.086100000 (date 2026-06-26)
Problem Types: CWE-367 | CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 7 | HIGH | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | [email protected] | Secondary | 6.7 | MEDIUM | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 6.7 | MEDIUM | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
HighPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Libcap Project | Libcap | - | All | All | All |
| Operating System | Redhat | Enterprise Linux | 10.0 | All | All | All |
| Operating System | Redhat | Enterprise Linux | 8.0 | All | All | All |
| Operating System | Redhat | Enterprise Linux | 9.0 | All | All | All |
| Application | Redhat | Openshift Container Platform | 4.0 | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Red Hat | Red Hat Enterprise Linux 10 | unaffected 0:2.69-7.el10_1.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 10 | unaffected 0:2.69-7.el10_2.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 10.0 Extended Update Support | unaffected 0:2.69-7.el10_0.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | unaffected 0:2.48-6.el8_10.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | unaffected 0:2.48-4.el8_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On | unaffected 0:2.48-4.el8_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Telecommunications Update Service | unaffected 0:2.48-5.el8_8.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8.8 Update Services For SAP Solutions | unaffected 0:2.48-5.el8_8.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:2.48-10.el9_7.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:2.48-10.el9_8.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:2.48-10.el9_7.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | unaffected 0:2.48-10.el9_8.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.2 Update Services For SAP Solutions | unaffected 0:2.48-9.el9_2.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.4 Extended Update Support | unaffected 0:2.48-9.el9_4.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9.6 Extended Update Support | unaffected 0:2.48-9.el9_6.1 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.13 | unaffected 413.92.202606160406-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.15 | unaffected 415.92.202606030318-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.16 | unaffected 416.94.202606051757-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.18 | unaffected 418.94.202606051320-0 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Container Platform 4.19 | unaffected 4.19.9.6.202606031700-0 * rpm | Not specified |
| CNA | Red Hat | Cost Management 4 | unaffected 1780946239 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.2 | unaffected 1780681984 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.3 | unaffected 1782352950 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.3 | unaffected 1782352919 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.3 | unaffected 1782353093 * rpm | Not specified |
| CNA | Red Hat | Red Hat AI Inference Server 3.3 | unaffected 1782352847 * rpm | Not specified |
| CNA | Red Hat | Red Hat Discovery 2 | unaffected 1778101579 * rpm | Not specified |
| CNA | Red Hat | Red Hat Discovery 2 | unaffected 1778156756 * rpm | Not specified |
| CNA | Red Hat | Red Hat Discovery 2 | unaffected 1782159791 * rpm | Not specified |
| CNA | Red Hat | Red Hat Discovery 2 | unaffected 1782166952 * rpm | Not specified |
| CNA | Red Hat | Red Hat Hardened Images | unaffected 2.78-1.1.hum1 * rpm | Not specified |
| CNA | Red Hat | Red Hat Insights Proxy 1.5 | unaffected 1780420428 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.9.3 | unaffected 1778056267 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.9.3 | unaffected 1778056233 * rpm | Not specified |
| CNA | Red Hat | Red Hat OpenShift Distributed Tracing 3.9.3 | unaffected 1778056245 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1779798159 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1779798164 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1779798165 * rpm | Not specified |
| CNA | Red Hat | Red Hat Update Infrastructure 5 | unaffected 1779798222 * rpm | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 6 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 6 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 7 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 7 | Not specified | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| access.redhat.com/errata/RHSA-2026:30078 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:29197 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:7473 | [email protected] | access.redhat.com | Vendor Advisory |
| access.redhat.com/errata/RHSA-2026:14162 | [email protected] | access.redhat.com | |
| www.openwall.com/lists/oss-security/2026/04/07/14 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Mailing List, Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:21275 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:23245 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:12441 | [email protected] | access.redhat.com | |
| www.openwall.com/lists/oss-security/2026/04/07/4 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Mailing List, Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:21254 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:27998 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:25096 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:14937 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:12423 | [email protected] | access.redhat.com | |
| www.openwall.com/lists/oss-security/2026/04/09/6 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Exploit, Mailing List, Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:30088 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:19130 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:13285 | [email protected] | access.redhat.com | |
| access.redhat.com/security/cve/CVE-2026-4878 | [email protected] | access.redhat.com | Vendor Advisory |
| access.redhat.com/errata/RHSA-2026:30089 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:22957 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:26542 | [email protected] | access.redhat.com | |
| www.openwall.com/lists/oss-security/2026/04/09/5 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Exploit, Mailing List, Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:22634 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:19458 | [email protected] | access.redhat.com | |
| bugzilla.redhat.com/show_bug.cgi | [email protected] | bugzilla.redhat.com | Issue Tracking, Vendor Advisory |
| www.openwall.com/lists/oss-security/2026/04/08/9 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Mailing List, Third Party Advisory |
| access.redhat.com/errata/RHSA-2026:24346 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:19346 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:25181 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:20595 | [email protected] | access.redhat.com | |
| bugzilla.redhat.com/show_bug.cgi | [email protected] | bugzilla.redhat.com | Permissions Required |
| access.redhat.com/errata/RHSA-2026:30087 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:23233 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:19456 | [email protected] | access.redhat.com | |
| access.redhat.com/errata/RHSA-2026:25044 | [email protected] | access.redhat.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Red Hat would like to thank Ali Raza for reporting this issue. (en)
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2026-03-26T06:56:21.213Z | Reported to Red Hat. |
| CNA | 2026-04-06T00:00:00.000Z | Made public. |
Workarounds
CNA: 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.
There are currently no legacy QID mappings associated with this CVE.