CVE-2026-4878

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

Published Apr 9, 2026 CVSS 3.1 · 6.7 Medium EPSS < 1% KEV · Not listed
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.

Remediation

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.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8193-2 libcap vulnerability
References
Link Providers
http://www.openwall.com/lists/oss-security/2026/04/07/14 cve-icon
http://www.openwall.com/lists/oss-security/2026/04/07/4 cve-icon
http://www.openwall.com/lists/oss-security/2026/04/08/9 cve-icon
http://www.openwall.com/lists/oss-security/2026/04/09/5 cve-icon
http://www.openwall.com/lists/oss-security/2026/04/09/6 cve-icon
https://access.redhat.com/errata/RHSA-2026:12423 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:12441 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:13285 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:14162 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:14937 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:19130 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:19346 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:19456 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:19458 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:20595 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:21254 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:21275 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:22634 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:22957 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:23233 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:23245 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:24346 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:25044 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:25096 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:25181 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:26542 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:27998 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:28887 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:29197 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:30078 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:30087 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:30088 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:30089 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:34098 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:39981 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:58981 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:59831 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:72502 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:74674 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:7473 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82304 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82322 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82347 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82354 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82372 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82857 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82888 cve-icon cve-icon
https://access.redhat.com/security/cve/CVE-2026-4878 cve-icon cve-icon
https://bugzilla.redhat.com/show_bug.cgi?id=2447554 cve-icon cve-icon cve-icon
https://bugzilla.redhat.com/show_bug.cgi?id=2451615 cve-icon cve-icon
https://nvd.nist.gov/vuln/detail/CVE-2026-4878 cve-icon
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-4878.json cve-icon
https://www.cve.org/CVERecord?id=CVE-2026-4878 cve-icon
History
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
Type Values Removed Values Added
First Time appeared Redhat openshift Ai
CPEs cpe:/a:redhat:openshift_ai:3.4::el9
Vendors & Products Redhat openshift Ai
References
Type Values Removed Values Added
First Time appeared Redhat cert Manager
CPEs cpe:/a:redhat:cert_manager:1.20::el9
Vendors & Products Redhat cert Manager
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.17::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4.14::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:ai_inference_server:3.3::el9
References
Type Values Removed Values Added
First Time appeared Redhat cost Management
CPEs cpe:/a:redhat:cost_management:4::el9
Vendors & Products Redhat cost Management
References
Type Values Removed Values Added
First Time appeared Redhat ai Inference Server
CPEs cpe:/a:redhat:ai_inference_server:3.2::el9
Vendors & Products Redhat ai Inference Server
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4 cpe:/a:redhat:openshift:4.19::el9
References
Type Values Removed Values Added
First Time appeared Redhat rhel Aus
Redhat rhel Eus Long Life
CPEs cpe:/o:redhat:rhel_aus:8.6::baseos
cpe:/o:redhat:rhel_eus_long_life:8.6::baseos
Vendors & Products Redhat rhel Aus
Redhat rhel Eus Long Life
References
Type Values Removed Values Added
First Time appeared Redhat rhel Tus
CPEs cpe:/o:redhat:rhel_e4s:8.8::baseos
cpe:/o:redhat:rhel_tus:8.8::baseos
Vendors & Products Redhat rhel Tus
References
Type Values Removed Values Added
First Time appeared Redhat insights Proxy
CPEs cpe:/a:redhat:insights_proxy:1.5::el9
Vendors & Products Redhat insights Proxy
References
Type Values Removed Values Added
First Time appeared Redhat rhel E4s
CPEs cpe:/a:redhat:rhel_e4s:9.2::appstream
cpe:/o:redhat:rhel_e4s:9.2::baseos
Vendors & Products Redhat rhel E4s
References
Type Values Removed Values Added
First Time appeared Redhat rhui
CPEs cpe:/a:redhat:rhui:5::el9
Vendors & Products Redhat rhui
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_eus:9.4::appstream
cpe:/o:redhat:rhel_eus:9.4::baseos
References
Type Values Removed Values Added
First Time appeared Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_eus:9.6::appstream
cpe:/o:redhat:rhel_eus:9.6::baseos
Vendors & Products Redhat rhel Eus
References
Type Values Removed Values Added
First Time appeared Redhat enterprise Linux Eus
CPEs cpe:/o:redhat:enterprise_linux_eus:10.0
Vendors & Products Redhat enterprise Linux Eus
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10.2
References
Type Values Removed Values Added
First Time appeared Redhat discovery
CPEs cpe:/a:redhat:discovery:2::el9
Vendors & Products Redhat discovery
References
Type Values Removed Values Added
First Time appeared Redhat openshift Distributed Tracing
CPEs cpe:/a:redhat:openshift_distributed_tracing:3.9::el9
Vendors & Products Redhat openshift Distributed Tracing
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:8 cpe:/o:redhat:enterprise_linux:8::baseos
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:9 cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10 cpe:/o:redhat:enterprise_linux:10.1
References
Type Values Removed Values Added
First Time appeared Libcap Project
Libcap Project libcap
CPEs cpe:2.3:a:libcap_project:libcap:-:*:*:*:*:*:*:*
cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
Vendors & Products Libcap Project
Libcap Project libcap
Type Values Removed Values Added
First Time appeared Redhat hardened Images
Redhat openshift Container Platform
Vendors & Products Redhat hardened Images
Redhat openshift Container Platform
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Redhat hummingbird
CPEs cpe:/a:redhat:hummingbird:1
Vendors & Products Redhat hummingbird
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'}