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

Inspect INC-2025-54794 in Interactive Incidents & Cases Hub

Defensive takeaway

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

Mapped AI security techniques

Mapped defensive controls

Source citation records