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

Exp

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.

Published: 2026-04-09 Last update: 2026-06-04 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-4878 is rated Exploit Available (50/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.01%). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2026-4878

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2026-4878

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-10 0.01%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-4878

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.7 3.1 MEDIUM
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
0.8 5.9 [email protected]
7.0 3.1 HIGH
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.0 5.9 [email protected]

Weakness enumeration for CVE-2026-4878

OS Trackers for CVE-2026-4878

vendor priority summary link
alpine CVE-2026-4878: 1 source package rows (libcap); 5 state rows across 5 repos (3.20-main, 3.21-main, 3.22-main, 3.23-main, edge-main); fixed 5, open 0. https://security.alpinelinux.org/vuln/CVE-2026-4878
debian not yet assigned CVE-2026-4878 not yet assigned priority: Debian including 1 source packages (libcap2), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 4, open 1. https://security-tracker.debian.org/tracker/CVE-2026-4878
redhat high https://access.redhat.com/security/cve/CVE-2026-4878
suse high CVE-2026-4878 severity important: SUSE including 31 source package names (1.1.2-2.22:libcap2-2.63-150400.3.6.1, 1.1.2-2.23:libcap2-2.63-150400.3.6.1, …), 117 product×package rows across 43 product lines (Container private-registry/harbor-core, Container private-registry/harbor-exporter, … (43 product lines)): Fixed 117. https://www.suse.com/security/cve/CVE-2026-4878/
ubuntu medium CVE-2026-4878 medium priority: Ubuntu including 1 source packages (libcap2), 9 status rows across 9 suites (bionic, focal, jammy, noble, questing, resolute, trusty, upstream, xenial): needs-triage 4, released 4, not-affected 1. https://ubuntu.com/security/CVE-2026-4878

Affected software / configurations for CVE-2026-4878

Vendor Product Version Raw CPE
libcap_project libcap cpe:2.3:a:libcap_project:libcap:-:*:*:*:*:*:*:*
redhat openshift_container_platform 4.0 cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:*
redhat enterprise_linux 8.0 cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
redhat enterprise_linux 9.0 cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*
redhat enterprise_linux 10.0 cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*

References for CVE-2026-4878

URL Tags
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:7473 Vendor Advisory
https://access.redhat.com/security/cve/CVE-2026-4878 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/14 Mailing List Third Party 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/08/9 Mailing List Third Party Advisory
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
cvelogic Threat Intelligence