CVE intelligence and bounded remediation

CVE-2026-4878 — A flaw was found in libcap

High CVSS 7

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.

Severity
High
CVSS
7 (3.1)
Published
2026-04-09
CISA KEV
Not currently listed
Ecosystem
software/application
Weaknesses
CWE-367

Affected products

  • libcap_project / libcap
  • redhat / openshift_container_platform / 4.0
  • redhat / enterprise_linux / 8.0
  • redhat / enterprise_linux / 9.0
  • redhat / enterprise_linux / 10.0

Matched remediation archetype

Race condition, TOCTOU, and lifecycle synchronization

This catalog composition supplies bounded fallback guidance. Explicitly reviewed curated workflows load with the complete record below.

Check exposure

  • Map concurrent actors, shared state, lock boundaries, signals, callbacks, retries, and check-then-use sequences in the affected path.
  • Determine whether untrusted users can influence timing, object names, filesystem state, or repeated state transitions.
  • Identify clustered and multi-process behavior that repository-local tests may not represent.

Remediate safely

  • Make the sensitive state transition atomic or protect it with a consistently ordered synchronization primitive.
  • Perform authorization and invariant checks on the same authoritative object and transaction used for the operation.
  • Use unique private resources, safe ownership transfer, and idempotent operations; add deterministic concurrency regression tests.

Authoritative sources

Complete CVE record and remediation plan

The detailed catalog view below loads this exact record, its source evidence, and the full seven-phase agentic change plan.