Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-4878

CVE-2026-4878: libcap Privilege Escalation Vulnerability

CVE-2026-4878 is a privilege escalation flaw in libcap caused by a TOCTOU race condition. Local attackers can manipulate file capabilities to gain elevated privileges. This article covers technical details, impact, and mitigation.

Published: April 9, 2026

CVE-2026-4878 Overview

A Time-of-check-to-time-of-use (TOCTOU) race condition vulnerability has been identified in libcap, a library that implements POSIX 1003.1e capabilities for Linux systems. The flaw exists in the cap_set_file() function, which is responsible for setting file capabilities on executables. A local unprivileged user with write access to a parent directory can exploit this race condition to redirect file capability updates to an attacker-controlled file, enabling privilege escalation.

Critical Impact

This vulnerability allows local attackers to inject capabilities into or strip capabilities from unintended executables, potentially leading to full system compromise through privilege escalation.

Affected Products

  • libcap (all versions prior to patched release)
  • Linux distributions using vulnerable libcap versions
  • Applications utilizing the cap_set_file() function

Discovery Timeline

  • April 7, 2026 - Vulnerability disclosed on OSS-Security mailing list
  • April 9, 2026 - CVE-2026-4878 published to NVD
  • April 9, 2026 - Last updated in NVD database

Technical Details for CVE-2026-4878

Vulnerability Analysis

The vulnerability resides in the cap_set_file() function within libcap, which handles the assignment of POSIX capabilities to executable files. POSIX capabilities provide a mechanism to divide traditional root privileges into distinct units, allowing more granular privilege assignment. When cap_set_file() processes a capability update, it performs a check on the target file and subsequently modifies it. However, a timing window exists between these two operations.

During this window, an attacker with write access to the parent directory can manipulate the file system state—such as replacing the target file with a symbolic link or another file—causing the capability modification to be applied to an unintended target. This is classified as CWE-367 (Time-of-check Time-of-use Race Condition).

Root Cause

The root cause is the non-atomic handling of file validation and capability modification in the cap_set_file() function. The function first checks properties of the target file (time-of-check) and then later modifies the file's capabilities (time-of-use). Without proper locking or atomic operations, an attacker can exploit the race window between these two actions. The lack of safe file descriptor handling and improper use of pathname-based operations instead of file-descriptor-based operations contributes to this vulnerability.

Attack Vector

The attack requires local access to the system with an unprivileged user account. The attacker must have write access to a parent directory of the target file to successfully exploit the vulnerability. The exploitation scenario involves the following mechanism:

The attacker monitors for capability-setting operations on files within directories they can write to. When cap_set_file() is invoked on a legitimate target, the attacker rapidly replaces or redirects the target file (using techniques like symlink creation or directory manipulation) during the race window. This causes the capability operation to be applied to an attacker-controlled file instead.

The attacker can use this to either:

  1. Inject elevated capabilities (such as CAP_SETUID, CAP_NET_ADMIN) into a malicious executable
  2. Strip capabilities from legitimate security-critical binaries

Since this is a local attack requiring specific timing and directory permissions, exploitation requires some preparation but is feasible for a determined attacker with persistent local access.

Detection Methods for CVE-2026-4878

Indicators of Compromise

  • Unexpected file capability changes on executables in user-writable directories
  • Presence of symbolic links in directories where capability operations are performed
  • Anomalous process executions with elevated capabilities from non-standard locations
  • Rapid file system operations (symlink creation, file replacement) coinciding with capability modifications

Detection Strategies

  • Monitor setxattr system calls with security.capability attribute modifications for suspicious patterns
  • Implement file integrity monitoring on critical system executables and their capabilities
  • Deploy audit rules to track cap_set_file() function calls and associated file system operations
  • Correlate process execution events with unexpected capability sets using SentinelOne's behavioral AI

Monitoring Recommendations

  • Enable Linux audit subsystem rules for capability-related operations: auditctl -a always,exit -F arch=b64 -S setxattr -F auid>=1000
  • Monitor directories commonly targeted for TOCTOU attacks, particularly those with mixed privilege write access
  • Implement SentinelOne's real-time file system monitoring to detect rapid file replacements and symbolic link manipulations

How to Mitigate CVE-2026-4878

Immediate Actions Required

  • Review systems for vulnerable libcap versions and prioritize patching on multi-user systems
  • Restrict write permissions on directories where capability operations are performed
  • Audit current file capabilities across the system using getcap -r / to establish a baseline
  • Implement restrictive directory permissions to minimize attack surface for local users

Patch Information

Security advisories and patches are being tracked through Red Hat's security channels. Administrators should consult the Red Hat CVE-2026-4878 Advisory for distribution-specific patching guidance. Additional details are available in Red Hat Bug Report #2447554 and Red Hat Bug Report #2451615. The OSS-Security mailing list discussions provide technical context: OSS-Security Update #4 and OSS-Security Update #14.

Workarounds

  • Remove write permissions from parent directories where capability-protected files reside
  • Use immutable attributes on critical directories: chattr +i /path/to/directory
  • Implement mandatory access control (SELinux/AppArmor) policies to restrict capability modifications
  • Consider temporarily disabling automated capability-setting scripts until patching is complete
bash
# Configuration example - Restrict directory permissions and enable auditing
# Remove group/world write from directories containing capability-protected files
chmod o-w /usr/local/bin
chmod g-w /usr/local/bin

# Enable audit logging for capability modifications
auditctl -a always,exit -F arch=b64 -S setxattr -F key=capability_changes
auditctl -a always,exit -F arch=b64 -S lsetxattr -F key=capability_changes

# List current file capabilities for baseline
getcap -r / 2>/dev/null > /var/log/capability_baseline.txt

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechLibcap

  • SeverityMEDIUM

  • CVSS Score6.7

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-367
  • Technical References
  • Red Hat CVE-2026-4878

  • Red Hat Bug Report #2447554

  • Red Hat Bug Report #2451615

  • OpenWall OSS-Security Update #14

  • OpenWall OSS-Security Update #4

  • OpenWall OSS-Security Update #9

  • OpenWall OSS-Security Update #5

  • OpenWall OSS-Security Update #6
  • Related CVEs
  • CVE-2025-1390: libcap PAM Privilege Escalation Flaw

  • CVE-2023-2603: Libcap Buffer Overflow Vulnerability

  • CVE-2023-2602: Libcap pthread_create() DOS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English