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

Inspect in Interactive Incidents Hub

Defensive lesson

Validate canonicalized file paths using path-segment containment rather than naive string startsWith() prefix comparisons.

Referenced techniques