NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MCP reference servers

CVE-2025-53110: @modelcontextprotocol/server-filesystem vulnerability allows for path validation bypass via colliding path prefix

highCVSS 4.0 7.3GHSA-hc55-p739-j48w

CVE-2025-53110 is a path validation bypass in the MCP filesystem reference server, @modelcontextprotocol/server-filesystem. A directory whose path merely starts with an allowed directory's path passes the check, so a client can reach files outside the sandbox. Upgrade to 2025.7.1.

Published Jul 1, 2025 · Updated Jul 2, 2025 · Analysis Nov 1, 2026

What an attacker can do

The server restricts an AI client to the directories it is started with. The old check tested whether the requested path began with an allowed path as a plain string. With an allowed directory of /home/user/work, a sibling such as /home/user/work-secrets also begins with that text and was accepted. The fix commit, merged from a branch named security/fix-path-prefix-and-symlink, touches src/filesystem/path-validation.ts and src/filesystem/index.ts.

The agent sends the file requests, so exploitation needs the agent to ask for the colliding path. A prompt injection in a web page, issue or document can make that happen, which is what the passive user interaction in the CVSS 4.0 vector reflects. Files next to the allowed directory can then be read, written or deleted. The advisory rates availability and subsequent-system impact high.

This is the prefix half of a pair. CVE-2025-53109 covers symlinks. Both were reported by Elad Beber of Cymulate.

Who is affected

The npm package @modelcontextprotocol/server-filesystem: 0.6.2 and earlier, and 2025.1.14 up to but not including 2025.7.1. The risk is real only if a sibling directory exists whose name begins with an allowed directory's name. Check the installed version:

npm ls @modelcontextprotocol/server-filesystem

For npx launches, read the version in the MCP client's server config.

@modelcontextprotocol/server-filesystem

Ecosystem
npm
Affected
<= 0.6.2
Fixed in
No patched version yet
Check
npm ls @modelcontextprotocol/server-filesystem

@modelcontextprotocol/server-filesystem

Ecosystem
npm
Affected
>= 2025.1.14, < 2025.7.1
Fixed in
2025.7.1
Check
npm ls @modelcontextprotocol/server-filesystem

How to fix it

Upgrade to 2025.7.1:

npm install @modelcontextprotocol/[email protected]

The advisory text says users of the older numbering should be on 0.6.3, but the package data lists no patched release in the 0.6.x range, so use 2025.7.1. Restart the MCP client afterwards. No other workaround is given. Until then, pick allowed directory names that no sibling directory shares as a prefix, for example by ending the name with a distinctive suffix.

How to tell if you were hit

List sibling directories whose names begin with an allowed directory's name:

ls -d /home/user/work*

Then check MCP server logs and agent transcripts for file operations on those paths. Beam records agent file access and MCP tool calls, so reads of paths next to the allowed directory show up in its record.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Versions of Filesystem prior to 0.6.3 & 2025.7.1 could allow access to unintended files in cases where the prefix matches an allowed directory. Users are advised to upgrade to 2025.7.1 to resolve the issue.

Thank you to Elad Beber (Cymulate) for reporting these issues.

Questions

Which version fixes CVE-2025-53110?

2025.7.1. The advisory text also names 0.6.3 for the older 0.6.x numbering.

What is a colliding path prefix?

An allowed directory /data/app also lets through /data/app-backup, because the check compared plain text beginnings and not whole path segments.

Is a malicious server required?

No. The flaw is in the legitimate filesystem server. A misled agent is enough to request a path outside the intended directory.

Is there a workaround?

The advisory gives none. Upgrade, or rename directories so none shares a prefix with an allowed one.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More MCP reference servers vulnerabilities

All MCP reference servers entries