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.
Problem types: cwe_id: CWE-367
description: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected products: vendor: Red Hat
product: Red Hat Enterprise Linux 10
cpes: cpe:/o:redhat:enterprise_linux:10.1
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 10
cpes: cpe:/o:redhat:enterprise_linux:10.2
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 10.0 Extended Update Support
cpes: cpe:/o:redhat:enterprise_linux_eus:10.0
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 8
cpes: cpe:/o:redhat:enterprise_linux:8::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
cpes: cpe:/o:redhat:rhel_aus:8.6::baseos
cpe:/o:redhat:rhel_eus_long_life:8.6::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On
cpes: cpe:/o:redhat:rhel_aus:8.6::baseos
cpe:/o:redhat:rhel_eus_long_life:8.6::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 8.8 Telecommunications Update Service
cpes: cpe:/o:redhat:rhel_e4s:8.8::baseos
cpe:/o:redhat:rhel_tus:8.8::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
cpes: cpe:/o:redhat:rhel_e4s:8.8::baseos
cpe:/o:redhat:rhel_tus:8.8::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9
cpes: cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9
cpes: cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9
cpes: cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9
cpes: cpe:/a:redhat:enterprise_linux:9::appstream
cpe:/o:redhat:enterprise_linux:9::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions
cpes: cpe:/a:redhat:rhel_e4s:9.2::appstream
cpe:/o:redhat:rhel_e4s:9.2::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9.4 Extended Update Support
cpes: cpe:/a:redhat:rhel_eus:9.4::appstream
cpe:/o:redhat:rhel_eus:9.4::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 9.6 Extended Update Support
cpes: cpe:/a:redhat:rhel_eus:9.6::appstream
cpe:/o:redhat:rhel_eus:9.6::baseos
default_status: affected
vendor: Red Hat
product: Red Hat Discovery 2
cpes: cpe:/a:redhat:discovery:2::el9
default_status: affected
vendor: Red Hat
product: Red Hat Discovery 2
cpes: cpe:/a:redhat:discovery:2::el9
default_status: affected
vendor: Red Hat
product: Red Hat Hardened Images
cpes: cpe:/a:redhat:hummingbird:1
default_status: affected
vendor: Red Hat
product: Red Hat Insights proxy 1.5
cpes: cpe:/a:redhat:insights_proxy:1.5::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift distributed tracing 3.9.3
cpes: cpe:/a:redhat:openshift_distributed_tracing:3.9::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift distributed tracing 3.9.3
cpes: cpe:/a:redhat:openshift_distributed_tracing:3.9::el9
default_status: affected
vendor: Red Hat
product: Red Hat OpenShift distributed tracing 3.9.3
cpes: cpe:/a:redhat:openshift_distributed_tracing:3.9::el9
default_status: affected
vendor: Red Hat
product: Red Hat Update Infrastructure 5
cpes: cpe:/a:redhat:rhui:5::el9
default_status: affected
vendor: Red Hat
product: Red Hat Update Infrastructure 5
cpes: cpe:/a:redhat:rhui:5::el9
default_status: affected
vendor: Red Hat
product: Red Hat Update Infrastructure 5
cpes: cpe:/a:redhat:rhui:5::el9
default_status: affected
vendor: Red Hat
product: Red Hat Update Infrastructure 5
cpes: cpe:/a:redhat:rhui:5::el9
default_status: affected
vendor: Red Hat
product: Red Hat Enterprise Linux 6
cpes: cpe:/o:redhat:enterprise_linux:6
default_status: unknown
vendor: Red Hat
product: Red Hat Enterprise Linux 6
cpes: cpe:/o:redhat:enterprise_linux:6
default_status: unknown
vendor: Red Hat
product: Red Hat Enterprise Linux 7
cpes: cpe:/o:redhat:enterprise_linux:7
default_status: unknown
vendor: Red Hat
product: Red Hat Enterprise Linux 7
cpes: cpe:/o:redhat:enterprise_linux:7
default_status: unknown
vendor: Red Hat
product: Red Hat OpenShift Container Platform 4
cpes: cpe:/a:redhat:openshift:4
default_status: affected
CVSS v3.1: attackComplexity: HIGH
attackVector: LOCAL
availabilityImpact: HIGH
baseScore: 6.7
baseSeverity: MEDIUM
confidentialityImpact: HIGH
integrityImpact: HIGH
privilegesRequired: LOW
scope: UNCHANGED
userInteraction: REQUIRED
vectorString: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
version: 3.1
Credits: lang: en
value: Red Hat would like to thank Ali Raza for reporting this issue.
Published: 2026-04-09T14:49:02.942Z