Skip to content

CVE-2025-54794: Claude Code Working Directory Sandbox Escape via Path Prefix Matching

HERMES

HERMES THREAT SCORE & OPERATIONAL EXPLOITABILITY

Target: Claude Code Local Path Boundary Validator
Confidence: 96%
84 / 100
HIGH

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 18 / 20
Threat Activity 15 / 20
Weaponization 17 / 20
Exposure 16 / 20
Prevalence 17 / 20
Impact 18 / 20
Exploit Maturity 17 / 20
Attack Chain Potential 18 / 20
⚖️ Divergence & Operational Rationale

CVSS v3.1 rates this vulnerability at 7.5. Hermes Threat Score rates it at 84 (HIGH) taking into account active exploit telemetry, critical AI workflow dependencies, and immediate host privilege escalation.

HASS

HASS AGENTIC SEVERITY & AUTONOMOUS RISK EVALUATION

Target: Claude Code Agentic CLI Tool & Memory Architecture
Confidence: 95%
88 / 100
CRITICAL

Measures specific systemic risk arising from autonomy, tool authority, and cascading execution.

Dimension Breakdown
Autonomy 18 / 20
Tool Access 19 / 20
Privilege 16 / 15
Persistence 16 / 15
External Impact 18 / 15
Propagation 17 / 15
⚖️ Divergence & Operational Rationale

Agentic security failure classified under AAP-006 (Context Boundary Collapse / Sandbox Confinement Bypass). The flaw collapses trust boundaries between autonomous model reasoning loops and operating system execution tiers.

🕸️ Connected Knowledge Graph & Provenance

CVE-2025-54794: Claude Code Working Directory Sandbox Escape via Path Prefix MatchingVULNERABILITY

Connected Nodes: 2
Active Relationships (Outgoing)
→ affectsPRODUCTClaude Code Agentic CLI
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

🔍 Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in Claude Code Agentic CLI documented in Hermes dossier.”

Supporting Verified Evidence:
→ exploitsAGENTIC ATTACK_PATTERNAAP-006: Inter-Agent Semantic Message Spoofing
92% VERY_HIGH

Exploitation of unauthenticated, unsigned inter-agent communication channels to forge delegation directives, impersonate orchestrator agents, and command worker subagents.

🔍 Why is this related? (Evidence & Provenance)

“CVE-2025-54794 weaponizes the agentic attack pattern formalized under AAP-006.”

Supporting Verified Evidence:

Claude Code Agentic CLI is widely deployed in production environments to support large language model orchestration, data pipelines, and agentic workflows. CVE-2025-54794 represents a significant threat to enterprise infrastructure:

AttributeTechnical SpecificationOperational Ramification
Vulnerability IDCVE-2025-54794Tracked in Hermes Knowledge Graph
Affected SystemClaude Code Agentic CLIAnthropic
Vulnerable ComponentClaude Code Local Path Boundary ValidatorInput processing & execution gate
Exploit VectorNetwork / Local Untrusted ContextCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CISA KEV StatusMonitored / High Weaponization PotentialUrgent patching prioritization
Attack TechniquesT1083 (File and Directory Discovery), T1005 (Data from Local System)MITRE ATT&CK Framework
Agentic Attack PatternAAP-006 (Context Boundary Collapse / Sandbox Confinement Bypass)Hermes Agentic Security Catalog

The vulnerability stems from insufficient validation and flawed isolation boundaries in Claude Code Local Path Boundary Validator:

[ Attacker Payload / Untrusted Input ]
│
▼
[ Ingress: Claude Code Local Path Boundary Validator ]
│ (Missing Canonical Sanitization / Dangerous Evaluation)
▼
[ Execution Tier: Host OS / Runtime Subprocess ]
│
▼
[ Impact: Arbitrary Code Execution / Credential Exfiltration ]

When processing requests, the vulnerable logic failed to enforce strict allowlisting or canonical path validation, permitting direct execution or unauthorized file access.


3. Exploit Scenario & Proof-of-Concept Workflow

Section titled “3. Exploit Scenario & Proof-of-Concept Workflow”

Defenders must understand how threat actors weaponize CVE-2025-54794 in real-world intrusion operations:

  1. Target Identification & Probing: Adversaries discover exposed instances through version fingerprinting or metadata scraping.
  2. Payload Delivery: A crafted request containing the exploit payload is transmitted to the vulnerable endpoint (Claude Code Local Path Boundary Validator).
  3. Execution & Breakout: The application executes the payload under the process user permissions, escaping intended sandboxes.
  4. Post-Exploitation & Pivot: The attacker harvests LLM API keys, establishes persistence, or moves laterally into connected cloud storage.

Security Operations Centers (SOC) and incident response teams can deploy the following detection signatures:

title: Suspicious Execution from Claude Code Agentic CLI Subprocess (CVE-2025-54794)
status: experimental
description: Detects abnormal process execution or file creation spawned by Claude Code Agentic CLI
references:
- https://codex.hermes-cyber.com/cve/2025/cve-2025-54794/
author: Hermes Cyber Intelligence
logsource:
category: process_creation
product: linux
detection:
selection:
ParentImage|endswith:
- '/python'
- '/node'
- '/langflow'
- '/flowise'
Image|endswith:
- '/sh'
- '/bash'
- '/curl'
- '/wget'
condition: selection
falsepositives:
- Legitimate administrative tooling
level: high

To mitigate exposure to CVE-2025-54794:

  1. Immediate Upgrade: Upgrade to Claude Code 0.2.111 or later immediately.
  2. Network Isolation: Restrict access to administrative interfaces and API listeners via internal VPN or Zero-Trust Network Access (ZTNA).
  3. Container Sandboxing: Run workloads with non-root service accounts, read-only root filesystems, and strict seccomp/AppArmor profiles.
  4. Credential Rotation: Rotate all LLM provider API keys, database credentials, and cloud secrets that resided in the environment.