CVE-2026-4878: libcap: TOCTOU race in cap_set_file() enables privesc
MEDIUM PoC AVAILABLEA local, unprivileged user with write access to a directory where file capabilities get applied can win a race condition in libcap's cap_set_file() function and redirect the capability write to a file they control, letting them inject powerful capabilities into an executable or strip capabilities from a security-relevant binary. This matters to CISOs less for exotic AI attack techniques and more for blast radius: libcap sits as a base-OS dependency in 129 downstream packages, including Red Hat's AI Inference Server container images (vllm-cuda-rhel9, vllm-rocm-rhel9, vllm-spyre-rhel9) and OpenShift CoreOS nodes, so any shared or multi-tenant AI inference host running these images inherits the exposure. The practical urgency is moderate rather than critical — CISA's SSVC decision is TRACK, the CVE is not in the KEV catalog, and the raw EPSS score is 0.00188 (very low absolute likelihood), even though a public PoC exists; the high attack complexity (AC:H) and required user interaction (UI:R) make this a timing-dependent, multi-step exploit rather than a one-shot bug. Action: apply the fixed libcap build via the relevant Red Hat errata (RHSA-2026:12423 and related) to rhcos, rhaiis, rhosdt, rhui5, and other listed products, prioritizing shared AI inference/GPU hosts, and in the meantime restrict write access to any directory targeted by setcap/cap_set_file automation.
What is the risk?
Local attack vector, high attack complexity, low privileges required, and user interaction required (AV:L/AC:H/PR:L/UI:R) place this squarely in the 'requires a foothold and good timing' category rather than remotely or trivially exploitable. No CISA KEV listing, no Nuclei template, and an SSVC decision of TRACK (the lowest actionable tier) indicate no evidence of active, opportunistic exploitation despite a public PoC existing. The raw EPSS score (0.00188) is very low in absolute terms, though the CVE sits in a relatively high percentile band, reflecting that most scored CVEs have near-zero predicted exploitation probability rather than signaling imminent attacks. Real risk is concentrated in environments where untrusted local users or processes coexist on the same host as capability-setting automation — most relevant for shared/multi-tenant AI inference clusters and CI/build systems, not for typical single-tenant model-serving deployments. Overall: patch on a normal maintenance cadence, not an emergency.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| vLLM | pip | — | No patch |
| vLLM | pip | — | No patch |
| vLLM | pip | — | No patch |
| compat-libcap1 | — | — | No patch |
| costmanagement/costmanagement-metrics-rhel9-operator | — | — | No patch |
| discovery/discovery-server-rhel9 | — | — | No patch |
| discovery/discovery-ui-rhel9 | — | — | No patch |
| insights-proxy/insights-proxy-container-rhel9 | — | — | No patch |
| libcap | — | — | No patch |
| libcap-main | — | — | No patch |
| rhaiis/model-opt-cuda-rhel9 | — | — | No patch |
| rhcos | — | — | No patch |
| rhosdt/opentelemetry-collector-rhel9 | — | — | No patch |
| rhosdt/opentelemetry-rhel9-operator | — | — | No patch |
| rhosdt/opentelemetry-target-allocator-rhel9 | — | — | No patch |
| rhui5/cds-rhel9 | — | — | No patch |
| rhui5/haproxy-rhel9 | — | — | No patch |
| rhui5/installer-rhel9 | — | — | No patch |
| rhui5/rhua-rhel9 | — | — | No patch |
How severe is it?
What is the attack surface?
What should I do?
1 step-
1) Patch libcap to the fixed version referenced in the Red Hat errata (RHSA-2026:12423, 12441, 13285, 14162, 14937, 19130, 19346, 19456, 19458, 20595) across every affected product: rhcos, the rhaiis vllm/model-opt images, rhosdt collector/operator/target-allocator, rhui5 components, discovery server/UI, insights-proxy, and the costmanagement operator. 2) Prioritize patching on shared or multi-tenant AI inference hosts and OpenShift nodes running rhaiis before general-purpose RHEL hosts. 3) Workaround where patching is delayed: restrict write access on directories targeted by setcap/cap_set_file automation to root-only or a trusted service account, and avoid running capability-setting operations against paths in world- or group-writable directories. 4) Detection: add auditd rules watching for changes to the
security.capabilityextended attribute, alert on unexpectedsetcap/cap_set_fileinvocations outside of known provisioning windows, and periodically diffgetcap -r /output on inference hosts against a known-good baseline. 5) Rebuild and redeploy AI inference container images once patched base images are published, rather than patching in place.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-4878?
A local, unprivileged user with write access to a directory where file capabilities get applied can win a race condition in libcap's cap_set_file() function and redirect the capability write to a file they control, letting them inject powerful capabilities into an executable or strip capabilities from a security-relevant binary. This matters to CISOs less for exotic AI attack techniques and more for blast radius: libcap sits as a base-OS dependency in 129 downstream packages, including Red Hat's AI Inference Server container images (vllm-cuda-rhel9, vllm-rocm-rhel9, vllm-spyre-rhel9) and OpenShift CoreOS nodes, so any shared or multi-tenant AI inference host running these images inherits the exposure. The practical urgency is moderate rather than critical — CISA's SSVC decision is TRACK, the CVE is not in the KEV catalog, and the raw EPSS score is 0.00188 (very low absolute likelihood), even though a public PoC exists; the high attack complexity (AC:H) and required user interaction (UI:R) make this a timing-dependent, multi-step exploit rather than a one-shot bug. Action: apply the fixed libcap build via the relevant Red Hat errata (RHSA-2026:12423 and related) to rhcos, rhaiis, rhosdt, rhui5, and other listed products, prioritizing shared AI inference/GPU hosts, and in the meantime restrict write access to any directory targeted by setcap/cap_set_file automation.
Is CVE-2026-4878 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-4878, increasing the risk of exploitation.
How to fix CVE-2026-4878?
1) Patch libcap to the fixed version referenced in the Red Hat errata (RHSA-2026:12423, 12441, 13285, 14162, 14937, 19130, 19346, 19456, 19458, 20595) across every affected product: rhcos, the rhaiis vllm/model-opt images, rhosdt collector/operator/target-allocator, rhui5 components, discovery server/UI, insights-proxy, and the costmanagement operator. 2) Prioritize patching on shared or multi-tenant AI inference hosts and OpenShift nodes running rhaiis before general-purpose RHEL hosts. 3) Workaround where patching is delayed: restrict write access on directories targeted by setcap/cap_set_file automation to root-only or a trusted service account, and avoid running capability-setting operations against paths in world- or group-writable directories. 4) Detection: add auditd rules watching for changes to the `security.capability` extended attribute, alert on unexpected `setcap`/`cap_set_file` invocations outside of known provisioning windows, and periodically diff `getcap -r /` output on inference hosts against a known-good baseline. 5) Rebuild and redeploy AI inference container images once patched base images are published, rather than patching in place.
What systems are affected by CVE-2026-4878?
This vulnerability affects the following AI/ML architecture patterns: model serving, inference infrastructure, multi-tenant/shared MLOps hosts.
What is the CVSS score for CVE-2026-4878?
CVE-2026-4878 has a CVSS v3.1 base score of 6.7 (MEDIUM). The EPSS exploitation probability is 0.21%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0105 Escape to Host AML.T0112 Machine Compromise Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
On a shared AI inference host — for example a multi-tenant vLLM/rhaiis cluster or a CI runner with local shell access for job containers — an attacker with an unprivileged local account has write access to a directory that a provisioning or hardening script periodically applies file capabilities to. The attacker repeatedly triggers or waits for that script to run, then races the TOCTOU window between the tool checking the target file and libcap's cap_set_file() actually writing capabilities to it, swapping in an attacker-controlled binary at the last moment. If the attacker wins the race, their binary receives powerful capabilities (e.g., CAP_SETUID or CAP_SYS_ADMIN), which they then execute to escalate privileges — potentially enough to break out of a container boundary and reach the underlying inference host — or alternatively they strip capabilities from a security-relevant binary to weaken existing defenses. Because this depends on winning a timing race and often on a privileged process being triggered (AC:H, UI:R), it is a patient, multi-step attack rather than something exploitable in a single request.
Weaknesses (CWE)
CWE-367 — Time-of-check Time-of-use (TOCTOU) Race Condition: The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
- [Implementation] The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
- [Implementation] When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H References
- access.redhat.com/errata/RHSA-2026:12423 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:12441 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:13285 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:14162 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:14937 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:19130 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:19346 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:19456 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:19458 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:20595 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:21254 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:21275 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:22634 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:22957 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:23233 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:23245 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:24346 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:25044 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:25096 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:25181 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:26542 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:27998 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:28887 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:29197 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:30078 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:30087 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:30088 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:30089 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:34098 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:39981 vendor-advisory x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:7473 vendor-advisory x_refsource_REDHAT
- access.redhat.com/security/cve/CVE-2026-4878 vdb-entry x_refsource_REDHAT
- bugzilla.redhat.com/show_bug.cgi
- bugzilla.redhat.com/show_bug.cgi issue-tracking x_refsource_REDHAT
Timeline
Related Vulnerabilities
CVE-2024-9053 9.8 vllm: RCE via unsafe pickle deserialization in RPC server
Same package: vllm CVE-2024-11041 9.8 vllm: RCE via unsafe pickle deserialization in MessageQueue
Same package: vllm CVE-2026-25960 9.8 vllm: SSRF allows internal network access
Same package: vllm CVE-2025-47277 9.8 vLLM: RCE via exposed TCPStore in distributed inference
Same package: vllm CVE-2025-32444 9.8 vLLM: RCE via pickle deserialization on ZeroMQ
Same package: vllm