Time-of-check Time-of-use (TOCTOU) Affecting libcap2 package, versions <1:2.66-4+deb12u3


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.2% (10th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN12-LIBCAP2-15960211
  • published10 Apr 2026
  • disclosed9 Apr 2026

Introduced: 9 Apr 2026

CVE-2026-4878  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade Debian:12 libcap2 to version 1:2.66-4+deb12u3 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libcap2 package and not the libcap2 package as distributed by Debian. See How to fix? for Debian:12 relevant fixed versions and status.

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.

References

CVSS Base Scores

version 3.1