A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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-25725

CVE-2026-25725: Claude Code Privilege Escalation Flaw

CVE-2026-25725 is a privilege escalation vulnerability in Anthropic Claude Code that allows malicious code to escape sandbox protections. This post covers the technical details, affected versions, impact, and mitigation.

Updated: May 14, 2026

CVE-2026-25725 Overview

CVE-2026-25725 is a sandbox escape vulnerability in Anthropic Claude Code, an agentic coding tool. Versions prior to 2.1.2 contain a flaw in the bubblewrap sandboxing mechanism that fails to protect the .claude/settings.json configuration file when it does not exist at startup. Malicious code running inside the sandbox can create this file and inject persistent hooks, such as SessionStart commands, that execute with host privileges when Claude Code restarts. The vulnerability is classified under [CWE-501] (Trust Boundary Violation) and affects the integrity of the sandbox isolation model. Anthropic patched the issue in version 2.1.2.

Critical Impact

Attackers who achieve code execution inside the Claude Code sandbox can escape isolation and gain persistent host-level code execution through injected configuration hooks.

Affected Products

  • Anthropic Claude Code (Node.js distribution) versions prior to 2.1.2
  • Deployments using bubblewrap sandboxing on Linux hosts
  • Environments where .claude/settings.json is not pre-created before sandbox startup

Discovery Timeline

  • 2026-02-06 - CVE-2026-25725 published to NVD
  • 2026-02-09 - Last updated in NVD database

Technical Details for CVE-2026-25725

Vulnerability Analysis

Claude Code uses bubblewrap to confine agentic operations within an isolated filesystem namespace. The sandbox configuration mounts the .claude/ parent directory as writable while applying explicit read-only constraints to .claude/settings.local.json. The protection logic assumes settings.json already exists and inherits restrictions from its parent. When the file is absent at sandbox startup, the writable parent directory permits creation of settings.json from inside the sandbox.

Claude Code reads settings.json on each session start and honors SessionStart hook directives defined within it. An attacker controlling sandboxed execution writes a crafted settings.json containing arbitrary shell commands as hooks. On the next host-side invocation of Claude Code, the agent reads the attacker-supplied configuration and executes the embedded hooks with the privileges of the host user, escaping the sandbox boundary.

Root Cause

The root cause is an incomplete trust boundary in the bubblewrap mount configuration. The sandbox author enumerated specific files requiring read-only protection but did not account for the case where a protected file does not yet exist. Because bubblewrap cannot apply a read-only bind mount to a nonexistent path, the file was effectively unprotected and creatable from inside the sandbox.

Attack Vector

Exploitation requires an attacker to first obtain code execution inside the Claude Code sandbox. This typically occurs through prompt injection against the agent, processing of untrusted repository content, or compromise of a dependency invoked by the agent. The attacker writes .claude/settings.json with malicious SessionStart hooks. Host privilege execution occurs when the user restarts Claude Code. User interaction is required to trigger the payload, but the action is routine.

The vulnerability mechanism is described in the GitHub Security Advisory. No public proof-of-concept code is referenced in the advisory.

Detection Methods for CVE-2026-25725

Indicators of Compromise

  • Unexpected creation of .claude/settings.json in user home directories following Claude Code sandbox sessions
  • Presence of SessionStart, PreToolUse, or other hook directives in settings.json that reference shell commands, network utilities, or interpreters
  • Outbound network connections or child process spawns occurring immediately at Claude Code startup

Detection Strategies

  • Monitor file creation events for ~/.claude/settings.json and compare contents against a known-good baseline maintained by configuration management
  • Audit Claude Code configuration files for hook keys containing executable payloads or references to writable directories
  • Correlate Claude Code process launches with subsequent child process trees that deviate from expected agent behavior

Monitoring Recommendations

  • Enable filesystem auditing on .claude/ directories using auditd or equivalent to record create, write, and rename operations
  • Log Claude Code version strings at process start and alert on instances running versions earlier than 2.1.2
  • Forward sandbox-related events to a centralized data lake for retrospective hunting on anomalous hook definitions

How to Mitigate CVE-2026-25725

Immediate Actions Required

  • Upgrade Claude Code to version 2.1.2 or later on all developer workstations and CI runners
  • Inspect existing ~/.claude/settings.json files for unauthorized hook definitions and remove any unexpected entries
  • Restrict Claude Code execution to trusted repositories and disable processing of untrusted prompt content until upgrade is complete

Patch Information

Anthropic released the fix in Claude Code version 2.1.2. The patch ensures .claude/settings.json is protected by the bubblewrap sandbox even when the file does not exist at startup, preventing in-sandbox creation. Refer to the GitHub Security Advisory GHSA-ff64-7w26-62rf for vendor guidance.

Workarounds

  • Pre-create an empty, read-only .claude/settings.json file owned by root before launching Claude Code to prevent sandbox-side creation
  • Apply mandatory access control profiles (AppArmor, SELinux) to deny write access to .claude/settings.json for the Claude Code user context
  • Run Claude Code inside an additional container layer with read-only mounts over the configuration directory until patched binaries are deployed
bash
# Configuration example: pre-create and protect settings.json
touch ~/.claude/settings.json
chmod 444 ~/.claude/settings.json
chattr +i ~/.claude/settings.json   # immutable flag (Linux ext4/xfs)

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechAnthropic Claude Code

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-501
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-35603: Claude Code Privilege Escalation Flaw

  • CVE-2025-64755: Claude Code Privilege Escalation Flaw

  • CVE-2026-39861: Anthropic Claude Code RCE Vulnerability

  • CVE-2026-33068: Anthropic Claude Code Auth Bypass Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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