Incident report
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 record
- Reported
- Severity
- High
- Vector
- Tool/MCP Abuse
- Affected system type
- Terminal Agentic Coding CLIs
- Reference
CVE-2025-54794- Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-54794
Defensive lesson
Validate canonicalized file paths using path-segment containment rather than naive string startsWith() prefix comparisons.
Referenced 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