CVEfocus › CVE database › CVE-2026-4878

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

CVSS 6.7 MediumEPSS 0.1% (higher than 2% of CVEs)Published 2026-04-09Updated 2026-11-04Assigner: redhat

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.

CWE-367

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

26Fixed
4Fix pending
6Will not fix
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libcap2Not affected
vulnerable_code_not_present
Ubuntu 25.10libcap2Fixed1:2.75-7ubuntu2.2UBUNTU-CVE-2026-4878
Ubuntu 24.04libcap2Fixed1:2.66-5ubuntu2.4UBUNTU-CVE-2026-4878
Ubuntu 22.04libcap2Fixed1:2.44-1ubuntu0.22.04.3UBUNTU-CVE-2026-4878
Ubuntu 20.04libcap2Fix pending1:2.32-1ubuntu0.2+esm1 (Ubuntu Pro)UBUNTU-CVE-2026-4878
Ubuntu 18.04libcap2Fix pending1:2.25-1.2ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2026-4878
Ubuntu 16.04libcap2Fix pending1:2.24-12ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2026-4878
Ubuntu 14.04libcap2Fix pending1:2.24-0ubuntu2+esm2 (Ubuntu Pro)UBUNTU-CVE-2026-4878
Debian 14libcap2Fixed1:2.78-1DEBIAN-CVE-2026-4878
Debian 13libcap2Fixed1:2.75-10+deb13u1DEBIAN-CVE-2026-4878
Debian 12libcap2Fixed1:2.66-4+deb12u3DEBIAN-CVE-2026-4878
Red Hat Enterprise Linux 10libcapFixed0:2.69-7.el10_2.1RHSA-2026:12423
Red Hat Enterprise Linux 10libcap-develFixed0:2.69-7.el10_2.1RHSA-2026:12423
Red Hat Enterprise Linux 9libcapFixed0:2.48-10.el9_7.1RHSA-2026:19346
Red Hat Enterprise Linux 9libcap-develFixed0:2.48-10.el9_8.1RHSA-2026:12441
Red Hat Enterprise Linux 8libcapFixed0:2.48-6.el8_10.1RHSA-2026:13285
Red Hat Enterprise Linux 8libcap-develFixed0:2.48-6.el8_10.1RHSA-2026:13285
Red Hat Enterprise Linux 7compat-libcap1Will not fix
Out of support scope
Red Hat Enterprise Linux 7libcapWill not fix
Out of support scope
Red Hat Enterprise Linux 7libcap-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6compat-libcap1Will not fix
Out of support scope
Red Hat Enterprise Linux 6libcapWill not fix
Out of support scope
Red Hat Enterprise Linux 6libcap-develWill not fix
Out of support scope
AlmaLinux 10libcapFixed2.69-7.el10_2.1ALSA-2026:12423
AlmaLinux 10libcap-develFixed2.69-7.el10_2.1ALSA-2026:12423
AlmaLinux 9libcapFixed2.48-10.el9_8.1ALSA-2026:12441
AlmaLinux 9libcap-develFixed2.48-10.el9_8.1ALSA-2026:12441
AlmaLinux 8libcapFixed2.48-6.el8_10.1ALSA-2026:13285
AlmaLinux 8libcap-develFixed2.48-6.el8_10.1ALSA-2026:13285
Rocky Linux 10libcapFixed0:2.69-7.el10_1.1RLSA-2026:19130
Rocky Linux 9libcapFixed0:2.48-10.el9_7.1RLSA-2026:19346
Rocky Linux 8libcapFixed0:2.48-6.el8_10.1RLSA-2026:13285
Alpine Linux 3.24libcapFixed2.78-r0ALPINE-CVE-2026-4878
Alpine Linux 3.23libcapFixed2.78-r0ALPINE-CVE-2026-4878
Alpine Linux 3.22libcapFixed2.78-r0ALPINE-CVE-2026-4878
Alpine Linux 3.21libcapFixed2.78-r0ALPINE-CVE-2026-4878
Alpine Linux 3.20libcapFixed2.78-r0ALPINE-CVE-2026-4878

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.