Pre-auditThree days of senior audit time for $1,500, credited in full toward your Zealynx audit.3 audit days, credited toward your auditSee how →
EscapeRoute Explained: Anthropic Filesystem MCP CVEs

EscapeRoute Explained: Anthropic Filesystem MCP CVEs

15 min
On this page▾

TL;DR

  • CVE-2025-53109 and CVE-2025-53110 ("EscapeRoute") are CVSS 7.3 High vulnerabilities (NVD; Cymulate, the discoverer, scored CVE-2025-53109 at 8.4) in Anthropic's official Filesystem MCP server, disclosed by Cymulate in July 2025.
  • CVE-2025-53109 is a symlink-following attack: the server did check where a symlink really pointed, but the catch block around that check swallowed its own refusal, so a symlink inside the allowed folder still reached files outside it.
  • CVE-2025-53110 is a path-prefix bypass: the server checked the requested path with a plain startsWith(), so a sibling folder whose name extends the allowed one (allow_dir_evil next to allow_dir) passed the check.
  • Both were fixed on 1 July 2025 in version 2025.7.1 (fix commit). The same server got further path-boundary advisories in October and November 2026, fixed in 2.0.1 to 2.4.0.
  • The CVSS 7.3 "High" rating understates real-world severity. Both CVEs produce arbitrary file read and code execution outside the configured root, on developer workstations that typically hold credentials, source code, and active session tokens.
  • The structural lesson: application-layer sandboxes are not sandboxes. Path-string comparison and symlink-resolution checks live in user-space code that is exactly what attackers target. Effective filesystem isolation requires kernel-enforced boundaries — chroot, mount namespaces, openat2 with RESOLVE_BENEATH, or container-level path constraints.

What the Filesystem MCP server does

Anthropic's Filesystem MCP server is one of the most widely-used MCP servers in production. It provides AI agents with a controlled interface for reading and writing files — the agent can list directories, read file contents, write files, and create directories within a configured root path. The server is shipped with Anthropic's reference implementation and adopted broadly across the MCP ecosystem.
The configured root is the security boundary. The operator specifies "the agent can access this directory and nothing else." Every tool invocation is supposed to be checked against the boundary before any filesystem operation occurs. The check failed in two distinct ways, producing the EscapeRoute pair.

What it does

Node.js filesystem calls follow symbolic links by default. A symlink inside the configured root that points outside it works as a portal: an agent operation on the link's path actually reads or writes the link's target.

Why it works

The server knew about this risk and had a check for it. After the prefix check, it ran fs.realpath on the requested path and refused the request if the real path was outside the allowed directories. The problem was the error handling around that check (trimmed):
1try {
2 const realPath = await fs.realpath(absolute);
3 if (!allowedDirectories.some(dir => normalizePath(realPath).startsWith(dir))) {
4 throw new Error("Access denied - symlink target outside allowed directories");
5 }
6 return realPath;
7} catch (error) {
8 // For new files that don't exist yet, verify parent directory
9 const parentDir = path.dirname(absolute);
10 // ...realpath(parentDir) passes the prefix check...
11 return absolute;
12}
The catch was meant for files that don't exist yet. It caught every error, including the "symlink target outside" refusal thrown a few lines above. It then checked the symlink's parent folder, which sits inside the allowed root, and returned the symlink's own path. The tool read or wrote through the link to wherever it pointed.
Cymulate chained this with CVE-2025-53110: create allow_dir_evil (which passes the prefix check), put a symlink to /etc/sudoers inside it, and ask the agent to read it. For code execution on macOS they pointed a symlink at a plist in ~/Library/LaunchAgents and had the server write it, so their command ran at the next login (Cymulate).

Severity (CVSS 7.3 High)

The prerequisite is a symlink inside the configured root. The server has no tool that creates one, so it has to come from something else that writes into that folder: another local user (Cymulate's demo used /private/tmp), or, on a developer machine, a repository the developer cloned, since Git checks out symlinks as real symlinks by default on macOS and Linux. Once the symlink is in place, every read or write through it can be redirected outside the sandbox.

CVE-2025-53110 — Path-Prefix Bypass

What it does

The Filesystem MCP server enforced its directory boundary with a string-prefix comparison: a requested path was allowed if it started with the configured root's path string.
1const isAllowed = allowedDirectories.some(dir => normalizedRequested.startsWith(dir));
With /private/tmp/allow_dir allowed, /private/tmp/allow_dir_evil starts with the same string, so it passes. So does any sibling whose name extends the allowed one: project-old next to project, app.bak next to app.

Why it works

The comparison treats "the path string starts with X" as "the path is inside X", and a folder name is not the same thing as a folder. The check has to compare against the root plus a path separator.
../ sequences do not get past this particular check. The server runs path.resolve on the request before comparing, so allow_dir/../../etc/passwd becomes /etc/passwd and is refused. The way out is a sibling folder with a longer name, and the server's own create_directory tool would create one, because the new folder's path passes the same prefix check.

Severity (CVSS 7.3 High)

The prerequisite is a sibling folder whose name starts with the allowed folder's name, and the agent can create that folder itself. An attacker who can influence the path arguments of a few tool calls, for example through a document or tool output the agent reads, can reach it. On its own it only reaches siblings of the allowed folder; combined with CVE-2025-53109 it reaches anything the server's user can.

Why CVSS understates the impact

The CVSS 7.3 "High" rating reflects the standard scoring formula, which considers attack-complexity and authentication-required as the primary modulators. But the actual impact of either CVE on a developer workstation is substantially worse than the rating suggests:
  • The Filesystem MCP server typically runs in the developer's process space, with the developer's UID and environment.
  • The configured root is typically a project directory inside the user's home directory.
  • Bypassing the root means the agent can read or write anywhere the developer can — including ~/.aws/credentials, ~/.ssh/, browser cookie stores, password manager files, hardware-wallet bridge state.
In practical terms, EscapeRoute is a credential-exfiltration primitive plus a code-execution primitive (any path the developer can write to is reachable, including those that auto-execute on next shell launch). Calling it CVSS 7.3 High is technically correct and operationally misleading.

The structural lesson: application-layer sandboxes are not sandboxes

Both EscapeRoute CVEs share a single structural failure: the sandbox boundary lived in application-layer code. The Filesystem MCP server's path-validation logic was a check inside user-space JavaScript. The attacker's job was to find a path string that the check approved but the kernel's filesystem layer resolved differently. There were always going to be such paths — the variety of OS-specific path normalisation behaviours, symlink-following semantics, and filesystem race conditions ensures that user-space path validation cannot be exhaustive.
This is a generalised lesson, not specific to the Filesystem MCP server:
Path validation in application code is bypassable. Decades of CVE history demonstrate this. Every project that has tried to enforce a "the agent can only access this directory" rule via path-string comparison has eventually shipped a CVE for the same reason.
Symlink semantics are OS-defined, not application-defined. When the application calls fs.readFile, the kernel resolves the path. The application does not get to override the kernel's resolution rules.
Race conditions add a third bypass class. Even with perfect path validation, TOCTOU (time-of-check / time-of-use) races allow attackers to swap the resolution target between the validation step and the operation step.
Effective filesystem isolation requires kernel-enforced boundaries:
  • chroot jails restrict the filesystem view such that the kernel itself cannot reach paths outside the jail.
  • Mount namespaces (Linux) and equivalent OS primitives restrict which filesystems are visible to the process.
  • openat2 with RESOLVE_BENEATH / RESOLVE_NO_SYMLINKS (Linux 5.6+) enforces that the kernel rejects path resolutions that escape the configured root.
  • Container-level path constraints (Docker, containerd, OCI) use mount points to isolate the filesystem.
The fix in 2025.7.1 changed three things (commit d00c60d). The containment check now compares against the directory plus a separator, so the path has to be the directory itself or start with allow_dir/. The catch block now handles only ENOENT (a file that doesn't exist yet) and rethrows every other error, including the symlink refusal. And write_file creates new files with the wx flag, which fails if anything, a symlink included, already sits at that name; existing files are written to a temp file and renamed over the name, which replaces a link instead of following it.
It still operates in application-layer code, and that showed. In October and November 2026 the same server received seven more advisories: a check run on a normalized string while the operation used the raw one, a case-insensitive symlink spelling that skipped realpath, and several races where a directory was swapped for a symlink between the check and the use. They were fixed in 2.0.1 to 2.4.0. On Linux and macOS the current server anchors reads, writes and listings to the directory it validated; its README says it cannot do that on Windows, where a local process that can write in the allowed folder can still win the race. The underlying lesson holds: any operator running an MCP server with filesystem access should run it inside a kernel-enforced boundary regardless of what application-layer checks the server itself implements.

Where this fits in the OWASP standard

EscapeRoute maps cleanly to several items in the OWASP Top 10 for Agentic Applications:
  • ASI05 (Unexpected Code Execution) by impact: arbitrary file read and write on a developer workstation produces credential theft and lateral execution paths.
  • ASI04 (Agentic Supply Chain) by transitive risk: the vulnerable server ships as part of the official MCP toolchain, so any operator who installed it inherited the exposure.
  • ASI02 (Tool Misuse) by mechanism: the tool's authority was supposed to be scoped to a directory; the scope did not hold.
A complete audit report typically maps the finding to all three.

Detection and mitigation

For any MCP server that accepts paths or operates on the filesystem:
1. Run inside a kernel-enforced boundary. Container, mount namespace, chroot, or platform equivalent. The application's own boundary checks are belt-and-braces; the actual security comes from the kernel-level layer.
2. Check the resolved path, and let a refusal stay a refusal. The validation must run against the resolved path, compared with the root plus a separator. The Filesystem MCP server already resolved symlinks before EscapeRoute; what broke was a broad catch that turned the refusal into an allow. Error handling around a security check should catch only the errors it expects.
3. Reject all symlinks crossing the boundary. Even resolved-path validation can be bypassed by TOCTOU if the symlink is created after validation but before use. Refuse paths whose resolution traverses any symlink whose target is outside the boundary.
4. Use openat2 with RESOLVE_BENEATH on Linux. This is the kernel-level guarantee that the resolution does not escape. Application code can still be wrong; the kernel will reject the operation regardless.
5. Run the server with constrained credentials. The MCP server process should not inherit the developer's full environment. Run it with a dedicated UID, restricted environment variables, and no access to credential stores or session tokens outside the configured root.
For Web3 deployments specifically, the rule is unconditional: any MCP server with filesystem access must run in a process boundary that cannot reach wallet keystores, hardware-wallet bridge state, or signing-related session tokens regardless of what paths the configured root permits.

How Zealynx audits filesystem-touching MCP servers

A Zealynx MCP Security Audit treats EscapeRoute-class findings as a standard category. The five focused tests:
  1. Boundary-enforcement layer audit. Identify whether the server's filesystem boundary lives in application code, kernel code, or both.
  2. Symlink test battery. Submit symlinks crossing the boundary in every supported direction; verify the server rejects each.
  3. Path-normalisation test battery. Submit paths exploiting OS-specific normalisation quirks (encoded separators, trailing whitespace, double slashes, dot-segments); verify the server rejects each.
  4. TOCTOU race test. Verify whether the server's check-then-use pattern is atomic; flag any time gap an attacker can exploit.
  5. Privilege-envelope check. Verify the server runs with constrained credentials and cannot reach the developer's broader environment.
Findings map to the relevant OWASP items and prioritised by exploit difficulty plus blast radius.

FAQ

1. What is EscapeRoute?
EscapeRoute is the researcher name for CVE-2025-53109 and CVE-2025-53110, a pair of CVSS 7.3 High vulnerabilities in Anthropic's official Filesystem MCP server disclosed by Cymulate in July 2025. CVE-2025-53109 is a symlink-following attack: the server's check on a symlink's real target was swallowed by its own catch block. CVE-2025-53110 is a path-prefix bypass: a plain startsWith() let sibling folders with longer names pass. Chained, they produce file read and write outside the sandbox.
2. Why is the CVSS 7.3 High rating misleading?
The CVSS 7.3 rating reflects the standard scoring formula's treatment of attack complexity and required authentication. It understates real-world impact because the Filesystem MCP server typically runs in the developer's process space with the developer's UID and environment, and the configured root is typically a project directory inside the user's home. Bypassing the boundary means the agent can read or write anywhere the developer can — including ~/.aws/credentials, ~/.ssh/, browser cookie stores, password managers, hardware-wallet bridge state. The practical impact is credential exfiltration plus code execution.
3. How does CVE-2025-53109 differ from CVE-2025-53110?
CVE-2025-53109 is a symlink-following attack: the server checked a symlink's real target, but the catch block meant for new files also caught that refusal and allowed the symlink path, so a symlink inside the root became a portal to anywhere the developer could access. CVE-2025-53110 is a path-prefix bypass: the server checked whether the requested path string started with the root's path string, so a sibling folder such as allow_dir_evil next to allow_dir passed. They share a root cause (application-layer path validation that diverges from kernel-level path resolution) but exploit it through different primitives.
4. What is the structural lesson from EscapeRoute?
The structural lesson is that application-layer sandboxes are not sandboxes. Path validation in application code can be bypassed by symlinks, by OS-specific path normalisation behaviours, and by TOCTOU races between check and use. Effective filesystem isolation requires kernel-enforced boundaries — chroot, mount namespaces, openat2 with RESOLVE_BENEATH, or container-level path constraints. Any MCP server with filesystem access should run inside such a boundary regardless of what application-layer checks the server itself implements.
5. How do I prevent EscapeRoute-class vulnerabilities?
To prevent EscapeRoute-class vulnerabilities, run filesystem-touching MCP servers inside a kernel-enforced boundary (container, mount namespace, chroot, or platform equivalent), use realpath resolution before any boundary check, reject all symlinks crossing the boundary, use openat2 with RESOLVE_BENEATH on Linux for kernel-level guarantee, and run the server with constrained credentials so it cannot reach the developer's broader environment regardless of what paths the configured root permits.
6. Are EscapeRoute CVEs still exploitable?
Both CVEs were patched in version 2025.7.1, and operators on older versions remain vulnerable. The same server received seven further path-boundary advisories in October and November 2026, fixed in 2.0.1 to 2.4.0. The package moved from date versions (up to 2026.8.31) to plain version numbers, and 2.4.1 sorts lower than 2026.8.31, so a lockfile or ^2026.x range never picks up the fixes: pin @modelcontextprotocol/[email protected] or later by hand. The structural pattern — application-layer path validation diverging from kernel-level path resolution — is generic and applies to every MCP server that operates on filesystems with application-layer boundary enforcement, so equivalent vulnerabilities can re-emerge in other servers that have not implemented kernel-enforced boundaries.
7. What is "TOCTOU" and how does it apply to filesystem MCP servers?
TOCTOU (time-of-check / time-of-use) is a race-condition class where a security check and the subsequent operation are not atomic, allowing an attacker to swap the resolution target between the two steps. For filesystem MCP servers: the server validates that a path is inside the configured root, then opens the file. Between the validation and the open, an attacker can replace the path with a symlink pointing outside the root, and the open operates on the new target. Even perfect path validation cannot defend against TOCTOU; the only structural fix is atomic check-and-operate primitives like openat2 with RESOLVE_BENEATH.
8. How does Zealynx audit for these patterns?
Zealynx's MCP Security Audit tests filesystem-touching MCP servers across five dimensions: boundary-enforcement layer audit (application-layer vs kernel-layer), symlink test battery (every direction of symlink-crossing), path-normalisation test battery (OS-specific quirks), TOCTOU race tests (verifying atomic check-and-use), and privilege-envelope check (constrained credentials, no developer-environment inheritance). Findings map to the relevant OWASP items with prioritised remediation guidance.

Glossary

TermDefinition
Symlink-Following AttackA sandbox-escape pattern where an attacker places a symbolic link inside a sandboxed directory, pointing to a target outside the directory; subsequent operations through the link transparently resolve to the target, bypassing application-layer boundary checks that inspected only the source path.
Path-Prefix BypassA sandbox-escape pattern where a sandbox boundary check uses string-prefix comparison to enforce a directory boundary, allowing paths whose strings start with the root path but whose actual filesystem location does not. The CVE-2025-53110 mechanism.
TOCTOU (Filesystem)Time-of-check / time-of-use race condition class where a security check and the subsequent filesystem operation are not atomic, allowing an attacker to swap the resolution target between the two steps and bypass the check.

Working auditors in your corner, all year

Zealynx Insiders: weekly live sessions, 1:1 advisory, pair-auditing, and Krait runs on your code, from an audit firm that publishes its reports.

Carlos (Bloqarl)
Written by

Founder at Zealynx

Keep reading
Postmark MCP Supply-Chain Attack: ASI04 in Production
AI securityJun 12

Postmark MCP Supply-Chain Attack: ASI04 in Production

13 min read
CVE-2025-49596: Anthropic MCP Inspector RCE Explained
AI securityMay 29

CVE-2025-49596: Anthropic MCP Inspector RCE Explained

13 min read
Cursor IDE MCP CVEs: MCPoison & CurXecute Explained
AI securityMay 22

Cursor IDE MCP CVEs: MCPoison & CurXecute Explained

12 min read