# CVE-2026-4878: Libcap: libcap: privilege escalation via toctou race condition in cap\_set\_file()

- Priority: **Routine**
- Reason: Not severe (CVSS 6.7, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-04-09 · Modified: 2026-11-04
- Aliases: ALPINE-CVE-2026-4878, MGASA-2026-0221, SUSE-SU-2026:1432-1, SUSE-SU-2026:1433-1, SUSE-SU-2026:21243-1, SUSE-SU-2026:21257-1, SUSE-SU-2026:21274-1, RHSA-2026:12423, RHSA-2026:12441, RHSA-2026:13285, RHSA-2026:19130, RHSA-2026:19346, RHSA-2026:19456, RHSA-2026:19458, RHSA-2026:20595, RHSA-2026:21254, RHSA-2026:22957, RHSA-2026:24346, RHSA-2026:7473, UBUNTU-CVE-2026-4878, USN-8193-1, USN-8193-2, DEBIAN-CVE-2026-4878, openSUSE-SU-2026:10536-1, openSUSE-SU-2026:20613-1
- Record: https://cvemate.com/vulnerability/CVE-2026-4878 · JSON: https://cvemate.com/vulnerability/CVE-2026-4878/json

## Description

```text
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.
```

## Signals

- CVSS: 7 high (v3.1, NVD) CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.214%, percentile 12.443%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (reference)

## Affected (first 20 of 33)

- alpine libcap (Alpine Linux): \< 2.78-r0
- debian libcap2 (Debian): \< 1:2.66-4+deb12u3 \| \< 1:2.75-10+deb13u1 \| \< 1:2.78-1
- ubuntu libcap2 (Ubuntu): \< 1:2.24-0ubuntu2+esm2 \| \< 1:2.24-12ubuntu0.1~esm2 \| \< 1:2.25-1.2ubuntu0.1~esm2 \| \< 1:2.32-1ubuntu0.2+esm1 \| \< 1:2.44-1ubuntu0.22.04.3 \| \< 1:2.66-5ubuntu2.4 \| \< 1:2.75-7ubuntu2.2
- libcap\_project libcap: na
- mageia libcap (Mageia): \< 2.52-5.2.mga9
- redhat enterprise\_linux: 8.0 \| 9.0 \| 10.0
- redhat openshift\_container\_platform: 4.0
- opensuse libcap&distro=openSUSE Leap 16.0 (openSUSE): \< 2.73-160000.3.1
- opensuse libcap&distro=openSUSE Tumbleweed (openSUSE): \< 2.78-1.1
- redhat libcap (Red Hat): \< 0:2.69-7.el10\_1.1 \| \< 0:2.48-10.el9\_7.1 \| \< 0:2.48-6.el8\_10.1 \| \< 0:2.69-7.el10\_2.1 \| \< 0:2.48-10.el9\_8.1 \| \< 0:2.69-7.el10\_0.1 \| \< 0:2.48-9.el9\_6.1 \| \< 0:2.48-9.el9\_4.1 \| \< 0:2.48-9.el9\_2.1 \| \< 0:2.48-5.el8\_8.1 \| \< 0:2.48-4.el8\_6.1 \| \< 0:2.78-1.1.hum1
- redhat libcap-debuginfo (Red Hat): \< 0:2.69-7.el10\_1.1 \| \< 0:2.48-10.el9\_7.1 \| \< 0:2.48-6.el8\_10.1 \| \< 0:2.69-7.el10\_2.1 \| \< 0:2.48-10.el9\_8.1 \| \< 0:2.69-7.el10\_0.1 \| \< 0:2.48-9.el9\_6.1 \| \< 0:2.48-9.el9\_4.1 \| \< 0:2.48-9.el9\_2.1 \| \< 0:2.48-5.el8\_8.1 \| \< 0:2.48-4.el8\_6.1
- redhat libcap-debugsource (Red Hat): \< 0:2.69-7.el10\_1.1 \| \< 0:2.48-10.el9\_7.1 \| \< 0:2.48-6.el8\_10.1 \| \< 0:2.69-7.el10\_2.1 \| \< 0:2.48-10.el9\_8.1 \| \< 0:2.69-7.el10\_0.1 \| \< 0:2.48-9.el9\_6.1 \| \< 0:2.48-9.el9\_4.1 \| \< 0:2.48-9.el9\_2.1 \| \< 0:2.48-5.el8\_8.1 \| \< 0:2.48-4.el8\_6.1
- redhat libcap-devel (Red Hat): \< 0:2.69-7.el10\_1.1 \| \< 0:2.48-10.el9\_7.1 \| \< 0:2.48-6.el8\_10.1 \| \< 0:2.69-7.el10\_2.1 \| \< 0:2.48-10.el9\_8.1 \| \< 0:2.69-7.el10\_0.1 \| \< 0:2.48-9.el9\_6.1 \| \< 0:2.48-9.el9\_4.1 \| \< 0:2.48-9.el9\_2.1 \| \< 0:2.48-5.el8\_8.1 \| \< 0:2.48-4.el8\_6.1 \| \< 0:2.78-1.1.hum1
- redhat libcap-static (Red Hat): \< 0:2.78-1.1.hum1
- suse libcap&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS (SUSE Linux Enterprise): \< 2.63-150400.3.6.1
- suse libcap&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS (SUSE Linux Enterprise): \< 2.63-150400.3.6.1
- suse libcap&distro=SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS (SUSE Linux Enterprise): \< 2.63-150400.3.6.1
- suse libcap&distro=SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS (SUSE Linux Enterprise): \< 2.63-150400.3.6.1
- suse libcap&distro=SUSE Linux Enterprise Micro 5.3 (SUSE Linux Enterprise): \< 2.63-150400.3.6.1
- suse libcap&distro=SUSE Linux Enterprise Micro 5.4 (SUSE Linux Enterprise): \< 2.63-150400.3.6.1

## References (first 20 of 86)

- <https://access.redhat.com/errata/RHSA-2026:12423>
- <https://access.redhat.com/errata/RHSA-2026:12441>
- <https://access.redhat.com/errata/RHSA-2026:13285>
- <https://access.redhat.com/errata/RHSA-2026:14162>
- <https://access.redhat.com/errata/RHSA-2026:14937>
- <https://access.redhat.com/errata/RHSA-2026:19130>
- <https://access.redhat.com/errata/RHSA-2026:19346>
- <https://access.redhat.com/errata/RHSA-2026:19456>
- <https://access.redhat.com/errata/RHSA-2026:19458>
- <https://access.redhat.com/errata/RHSA-2026:20595>
- <https://access.redhat.com/errata/RHSA-2026:21254>
- <https://access.redhat.com/errata/RHSA-2026:21275>
- <https://access.redhat.com/errata/RHSA-2026:22634>
- <https://access.redhat.com/errata/RHSA-2026:22957>
- <https://access.redhat.com/errata/RHSA-2026:23233>
- <https://access.redhat.com/errata/RHSA-2026:23245>
- <https://access.redhat.com/errata/RHSA-2026:24346>
- <https://access.redhat.com/errata/RHSA-2026:25044>
- <https://access.redhat.com/errata/RHSA-2026:25096>
- <https://access.redhat.com/errata/RHSA-2026:25181>

---

Data as of 2026-12-05T11:08:15.341Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
