# CVE-2026-4878: Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()

- Severity: Medium 6.7 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2026-04-09T14:49:02.942Z
- Modified: 2026-11-04T23:17:39.403Z
- Weaknesses: CWE-367
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: redhat

## 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.

(As written by CVE List.)

## Affected

- libcap: no versions given (not affected: from 0:2.69-7.el10_1.1 before *; from 0:2.69-7.el10_2.1 before *; from 0:2.69-7.el10_0.1 before *; from 0:2.48-6.el8_10.1 before *; from 0:2.48-4.el8_6.1 before *; from 0:2.48-5.el8_8.1 before *; from 0:2.48-10.el9_7.1 before *; from 0:2.48-10.el9_8.1 before *; from 0:2.48-9.el9_2.1 before *; from 0:2.48-9.el9_4.1 before *; from 0:2.48-9.el9_6.1 before *)
- openshift/ose-rhel-coreos-8: no versions given (not affected: from 412.86.202608241157-0 before *)
- openshift/ose-rhel-coreos-9: no versions given (not affected: from 413.92.202606160406-0 before *; from 414.92.202606231112-0 before *; from 415.92.202606030318-0 before *; from 416.94.202606051757-0 before *; from 417.94.202606250942-0 before *; from 418.94.202606051320-0 before *; from 4.19.9.6.202606031700-0 before *)
- cert-manager/jetstack-cert-manager-acmesolver-rhel9: no versions given (not affected: from 1791371080 before *; from 1791459707 before *)
- cert-manager/jetstack-cert-manager-rhel9: no versions given (not affected: from 1791371069 before *; from 1791459711 before *)
- cert-manager/cert-manager-operator-rhel9: no versions given (not affected: from 1791788287 before *; from 1789029076 before *)
- cert-manager/cert-manager-operator-bundle: no versions given (not affected: from 1791970484 before *; from 1791966259 before *)
- cert-manager/cert-manager-istio-csr-rhel9: no versions given (not affected: from 1791459759 before *)
- cert-manager/cert-manager-trust-manager-rhel9: no versions given (not affected: from 1790598593 before *)
- costmanagement/costmanagement-metrics-rhel9-operator: no versions given (not affected: from 1780946239 before *; from 1783539156 before *)
- rhaiis/model-opt-cuda-rhel9: no versions given (not affected: from 1780681984 before *; from 1782352950 before *)
- rhaiis/vllm-spyre-rhel9: no versions given (not affected: from 1782352919 before *)
- rhaiis/vllm-rocm-rhel9: no versions given (not affected: from 1782353093 before *)
- rhaiis/vllm-cuda-rhel9: no versions given (not affected: from 1782352847 before *)
- discovery/discovery-server-rhel9: no versions given (not affected: from 1778101579 before *; from 1782159791 before *)
- discovery/discovery-ui-rhel9: no versions given (not affected: from 1778156756 before *; from 1782166952 before *)
- libcap-main: no versions given (not affected: from 2.78-1.1.hum1 before *)
- insights-proxy/insights-proxy-container-rhel9: no versions given (not affected: from 1780420428 before *)
- rhai/base-image-neuron-rhel9: no versions given (not affected: from 1790703542 before *)
- rhosdt/opentelemetry-collector-rhel9: no versions given (not affected: from 1778056267 before *)
- rhosdt/opentelemetry-rhel9-operator: no versions given (not affected: from 1778056233 before *)
- rhosdt/opentelemetry-target-allocator-rhel9: no versions given (not affected: from 1778056245 before *)
- rhui5/cds-rhel9: no versions given (not affected: from 1779798159 before *)
- rhui5/haproxy-rhel9: no versions given (not affected: from 1779798164 before *)
- rhui5/installer-rhel9: no versions given (not affected: from 1779798165 before *)
- rhui5/rhua-rhel9: no versions given (not affected: from 1779798222 before *)
- rhui5/cds-kubernetes-tp-rhel9: no versions given (not affected: from 1787241211 before *)
- rhui5/installer-tp-rhel9: no versions given (not affected: from 1787135742 before *)
- rhui5/rhua-tp-rhel9: no versions given (not affected: from 1787241260 before *)
- compat-libcap1: no versions given
- openshift4/ose-hypershift-rhel9: no versions given
- rhcos: no versions given (not affected: from 412.86.202608241157-0 before *; from 413.92.202606160406-0 before *; from 414.92.202606231112-0 before *; from 415.92.202606030318-0 before *; from 416.94.202606051757-0 before *; from 417.94.202606250942-0 before *; from 418.94.202606051320-0 before *; from 4.19.9.6.202606031700-0 before *)
- libcap_project libcap: no versions given
- redhat openshift_container_platform: 4.0
- redhat enterprise_linux: 8.0; 9.0; 10.0

## Every score

- redhat: CVSS:3.1 6.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H`
- redhat-SADP: CVSS:3.1 6.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <http://www.openwall.com/lists/oss-security/2026/04/09/5> (exploit, mailing-list, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2026/04/09/6> (exploit, mailing-list, third-party-advisory)
- <https://access.redhat.com/errata/RHSA-2026:12423> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:12441> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:13285> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:14162> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:14937> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:19130> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:19346> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:19456> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:19458> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:20595> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:21254> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:21275> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:22634> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:22957> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:23233> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:23245> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:24346> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:25044> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:25096> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:25181> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:26542> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:27998> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:28887> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:29197> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:30078> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:30087> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:30088> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:30089> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:34098> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:39981> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:58981> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:59831> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:72502> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:74674> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:7473> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82304> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82322> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82347> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82354> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82372> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82857> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:82888> (vendor-advisory)
- <https://access.redhat.com/security/cve/CVE-2026-4878> (vdb-entry, vendor-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2447554> (permissions-required)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2451615> (issue-tracking, vendor-advisory)
- <http://www.openwall.com/lists/oss-security/2026/04/07/4> (mailing-list, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2026/04/07/14> (mailing-list, third-party-advisory)
- <http://www.openwall.com/lists/oss-security/2026/04/08/9> (mailing-list, third-party-advisory)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-4878.json>

## Sources

- CVE List: [CVE-2026-4878](https://www.cve.org/CVERecord?id=CVE-2026-4878), CVE Terms of Use, modified 2026-11-04
- NVD: [CVE-2026-4878](https://nvd.nist.gov/vuln/detail/CVE-2026-4878), Public domain, modified 2026-11-04

---

Page: https://cve.day/CVE-2026-4878 · Whole record: https://cve.day/CVE-2026-4878.json · Rebuilt by cve.day 2026-11-25T22:59:18.382Z
