Documented Incident · INC-2025-54794 · High severity
Agentic Coding CLI Path Prefix Containment Bypass Allowing Out-of-Scope Writes
CVE-2025-54794 (published August 4, 2025, disclosed by Cymulate as InversePrompt) identified a directory-prefix containment bug in Claude Code's workspace access guard. Because path checks compared prefix strings without enforcing a path-separator boundary, an agent restricted to `/repo` could access or modify sibling directories sharing that string prefix (such as `/repo-prod` or `/repo_keys`). Indirect prompt injections inside a sandboxed test repo could pivot into adjacent sensitive folders on the developer's machine. Anthropic patched path validation using strict canonical separator-delimited checks.
Incident dossier metadata
- Case ID
INC-2025-54794- Classification
- Incident
- Date
- Severity
- High
- Sector
- Software Development & AI Tooling
- Attack vector
- Tool/MCP Abuse
- System type
- Terminal Agentic Coding CLIs
- CVE / reference
CVE-2025-54794- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-54794
Defensive takeaway
Validate canonicalized file paths using path-segment containment rather than naive string startsWith() prefix comparisons.
Mapped AI security techniques
- Data from Local System AML.T0037
- LLM Prompt Injection: Indirect AML.T0051.001
- AI Agent Tool Invocation AML.T0053
- Machine Compromise: Local AI Agent AML.T0112.000
Mapped defensive controls
Source citation records
- NVD Record CVE-2025-54794: Claude Code Directory Prefix Containment Bypass · NIST National Vulnerability Database (NVD) ·