MediumNews
Anthropic Filesystem MCP Server: Directory Access Bypass via Improper Path Validation
- Published
- Record updated
Summary
A researcher found that Anthropic's filesystem MCP server validates allowed paths with a .startsWith comparison in the validatePath function of index.ts, without checking that the path is a directory. As a result, a directory allowlisted through allowedDirectories, such as /mnt/finance/data, also grants access to sibling paths sharing the same prefix, such as /mnt/finance/data-archived. The researcher reported the issue to Anthropic on June 1, 2025, and Elad Beber had independently reported it earlier.
Mitigation
Anthropic rewrote large parts of the filesystem server to support the roots feature of MCP, and the updated release fixed this vulnerability.
Topics
Related items
- InfoPrompting AI to be ‘thorough’ can drive sandbox escapes, Anthropic saysSame vendor · CSO Online
- InfoDespite doom and gloom headlines, AI attacks are thin on the groundSame vendor · CSO Online
- InfoDrupal Flaw Found by Anthropic Scanner Exploited in AttacksSame vendor · SecurityWeek
- InfoCrowdStrike Accelerates the Shift to the Agentic SOCSame vendor · CrowdStrike Blog
- InfoThree LLM inflection points in twelve monthsSame vendor · Simon Willison's Weblog