CVE-2025-53109: @modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handling
CVE-2025-53109 is a symlink bypass in the MCP filesystem reference server, @modelcontextprotocol/server-filesystem. A symlink inside an allowed directory can point outside it, and the server follows it, so an agent can reach files it was not meant to touch. Upgrade to 2025.7.1.
Published Jul 1, 2025 · Updated Jul 2, 2025 · Analysis Nov 1, 2026
What an attacker can do
The server limits an AI client to a list of allowed directories passed at startup. Its path check compared the requested path with those directories, but did not resolve symlinks first. A symlink placed inside an allowed directory that targets another location therefore passed the check, and reads or writes went to the target. The fix commit, titled "Address symlink and path prefix issues with allowed directories", changes src/filesystem/path-validation.ts and src/filesystem/index.ts and adds tests.
The CVSS 4.0 vector has user interaction passive and attack requirements present, which fits the usual route: a prompt-injected or manipulated agent, or a repo that ships a symlink, leads the server to follow it. The vector rates availability and subsequent-system impact high: files outside the sandbox can be read, overwritten or destroyed, which can include SSH keys, config files and credentials.
The sibling flaw, CVE-2025-53110, bypasses the same check through a directory name prefix, and was reported by the same researcher at Cymulate.
Who is affected
The npm package @modelcontextprotocol/server-filesystem in two ranges: 0.6.2 and earlier, and 2025.1.14 up to but not including 2025.7.1. The advisory text names 0.6.3 as an earlier fix for the old line; the package data lists no patched version for the 0.6.x range, so move to the 2025.7.1 line. Check what you run:
npm ls @modelcontextprotocol/server-filesystemIf you start it with npx, look at the version pinned in your MCP client config. Unpinned npx entries pick up the latest release at install time, but a cached older copy may persist.
@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 @modelcontextprotocol/server-filesystem 2025.7.1:
npm install @modelcontextprotocol/[email protected]Also update the pinned version in your MCP client configuration, then restart the client. The advisory names no workaround. Until you upgrade, keep the allowed directories free of symlinks you did not create, and do not point the server at untrusted checkouts.
How to tell if you were hit
Search the directories you allow for symbolic links whose targets sit outside them:
find /path/to/allowed -type l -lsReview the MCP server's file reads and writes for paths that resolve outside the allowed list. Beam records agent file access and MCP tool calls, and its rules can flag reads of sensitive files such as keys and credentials.
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 via symlinks within allowed directories. Users are advised to upgrade to 2025.7.1 to resolve.
Thank you to Elad Beber (Cymulate) for reporting these issues.
Questions
- Which version fixes CVE-2025-53109?
2025.7.1 is the patched version for the current numbering. The advisory text also mentions 0.6.3 for the older 0.6.x line.
- How does this differ from CVE-2025-53110?
This one is about symlinks inside an allowed directory that point elsewhere. The other is a prefix collision, where a directory whose name starts with an allowed path passes the check.
- Does an attacker need to talk to the server directly?
Usually not. The client or agent sends the requests. A symlink in a repo or a manipulated prompt can lead it to read or write outside the sandbox.
- Does the stdio transport protect me?
No. The flaw is in path validation, whatever the transport.
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 entriesCVE-2026-27735
mcp-server-git : Path traversal in git_add allows staging files outside repository boundaries
medium6.4Feb 26, 2026CVE-2025-68143
mcp-server-git's unrestricted git_init tool allows repository creation at arbitrary filesystem locations
medium6.5Dec 17, 2025CVE-2025-68144
mcp-server-git argument injection in git_diff and git_checkout functions allows overwriting local files
medium6.3Dec 17, 2025CVE-2025-68145
mcp-server-git has missing path validation when using --repository flag
medium6.4Dec 17, 2025CVE-2025-53110
@modelcontextprotocol/server-filesystem vulnerability allows for path validation bypass via colliding path prefix
high7.3No fixJul 1, 2025
