banner logoJoin us at RSAC™ 2026 Conference, March 23–March 26 | North Expo, Booth N-5863Join us at RSAC™ 2026, March 23–March 26Learn More
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • 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
    • 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
    • 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-2025-54794

CVE-2025-54794: Anthropic Claude Code Path Traversal Flaw

CVE-2025-54794 is a path traversal vulnerability in Anthropic Claude Code that allows attackers to bypass directory restrictions and access files outside the CWD. This article covers technical details, affected versions, and mitigations.

Published: March 11, 2026

CVE-2025-54794 Overview

Claude Code, an agentic coding tool developed by Anthropic, contains a path traversal vulnerability (CWE-22) in versions prior to 0.2.111. The vulnerability stems from a path validation flaw that uses prefix matching instead of canonical path comparison. This implementation error allows attackers to bypass directory restrictions and access files outside the current working directory (CWD).

Successful exploitation requires two conditions: the presence of (or ability to create) a directory with the same prefix as the CWD, and the ability to add untrusted content into a Claude Code context window. This combination could allow malicious actors to read or manipulate sensitive files beyond the intended scope of the tool.

Critical Impact

Attackers can bypass directory restrictions to access, read, or potentially modify files outside the intended working directory, potentially exposing sensitive source code, configuration files, or credentials.

Affected Products

  • Anthropic Claude Code versions below 0.2.111
  • Claude Code for Node.js (all platforms)
  • Applications integrating Claude Code as a dependency

Discovery Timeline

  • 2025-08-05 - CVE-2025-54794 published to NVD
  • 2025-10-27 - Last updated in NVD database

Technical Details for CVE-2025-54794

Vulnerability Analysis

This vulnerability is classified as a Path Traversal (Directory Traversal) issue under CWE-22. The root cause lies in how Claude Code validates file paths to enforce directory boundaries. Rather than performing canonical path comparison—which would resolve symbolic links, relative paths, and normalize the path before comparison—the application relies on simple prefix matching.

Prefix matching compares the beginning of a requested path against the allowed directory path. This approach is fundamentally flawed because it fails to account for scenarios where directory names share common prefixes. For example, if the CWD is /home/user/project, an attacker could potentially access files in /home/user/project-secrets by exploiting the prefix match logic.

The vulnerability requires network access and some user interaction, as untrusted content must be injected into the Claude Code context window. This could occur through malicious repository content, compromised dependencies, or social engineering tactics that lead users to process attacker-controlled input.

Root Cause

The vulnerability originates from an insecure path validation implementation. The code uses string prefix matching to determine whether a requested file path falls within the allowed directory boundaries. This approach fails to properly handle edge cases where:

  1. Directory names share common prefixes (e.g., /project vs /project-backup)
  2. Path traversal sequences could be normalized differently across operating systems
  3. Symbolic links or junction points could redirect path resolution

Proper path validation requires resolving paths to their canonical form using filesystem-aware normalization before comparison, ensuring that all symbolic links are resolved and relative path components (. and ..) are eliminated.

Attack Vector

The attack vector is network-based, requiring the attacker to inject malicious content into the Claude Code context window. This could be achieved through several scenarios:

  1. Malicious Repository Content: An attacker could create a repository with specially crafted file references that exploit the prefix matching flaw when processed by Claude Code.

  2. Prompt Injection: By including malicious path references in content that Claude Code processes, an attacker could direct the tool to access files outside the intended directory.

  3. Dependency Confusion: If Claude Code processes content from compromised or malicious dependencies, the path traversal could be triggered during automated code analysis.

The exploitation mechanism involves crafting file paths that satisfy the prefix match validation while actually pointing to locations outside the CWD. This is typically achieved by creating or referencing directories that share the CWD prefix but contain sensitive data in sibling or parent directory structures.

Detection Methods for CVE-2025-54794

Indicators of Compromise

  • Unexpected file access attempts to paths outside the designated working directory
  • Log entries showing file operations on directories with similar prefixes to legitimate project directories
  • Unusual context window content containing crafted path references or directory traversal patterns
  • Evidence of newly created directories that mirror legitimate project path prefixes

Detection Strategies

  • Monitor Claude Code file access patterns for operations targeting unexpected directory locations
  • Implement file integrity monitoring on sensitive directories adjacent to development workspaces
  • Review audit logs for path normalization anomalies or symbolic link resolution events
  • Deploy endpoint detection rules that alert on directory traversal patterns in AI coding tool contexts

Monitoring Recommendations

  • Enable verbose logging for Claude Code file system operations during security assessments
  • Implement runtime application self-protection (RASP) to detect path traversal attempts
  • Configure SentinelOne Singularity to monitor for anomalous file access patterns from Node.js processes
  • Establish baseline file access patterns and alert on deviations during Claude Code sessions

How to Mitigate CVE-2025-54794

Immediate Actions Required

  • Upgrade Claude Code to version 0.2.111 or later immediately
  • Review recent file access logs for any suspicious path traversal attempts
  • Audit any directories that share prefixes with your development working directories
  • Validate the integrity of files in directories adjacent to Claude Code workspaces

Patch Information

Anthropic has released version 0.2.111 of Claude Code which addresses this vulnerability by implementing proper canonical path comparison instead of prefix matching. Organizations using Claude Code should upgrade to this version immediately.

For detailed patch information and security guidance, refer to the GitHub Security Advisory GHSA-pmw4-pwvc-3hx2.

Workarounds

  • Isolate Claude Code execution environments using containerization or sandboxing to limit file system access scope
  • Implement strict file system permissions that prevent read access to sensitive directories from the user context running Claude Code
  • Avoid processing untrusted content or repositories with Claude Code until the patch is applied
  • Use network segmentation to limit the tool's access to sensitive file shares or mounted volumes
bash
# Upgrade Claude Code to patched version
npm update @anthropic/claude-code@0.2.111

# Verify installed version
npm list @anthropic/claude-code

# For global installations
npm update -g @anthropic/claude-code@0.2.111

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechAnthropic Claude Code

  • SeverityHIGH

  • CVSS Score7.7

  • EPSS Probability0.05%

  • 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-22
  • Vendor Resources
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-25724: Anthropic Claude Code Path Traversal

  • CVE-2026-25723: Anthropic Claude Code Auth Bypass Flaw

  • CVE-2026-25725: Claude Code Privilege Escalation Flaw

  • CVE-2025-64755: Claude Code Privilege Escalation Flaw
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
  • English
  • 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