Incident report

Reference Filesystem MCP Server Symlink Escape Outside Allowed Workspace Roots

CVE-2025-53109 (published July 2, 2025, disclosed by Cymulate) revealed a symlink-following sandbox escape in the official reference `@modelcontextprotocol/server-filesystem` package. When an agent invoked file-read or file-write tools on a symbolic link placed inside an authorized directory, path validation failed to verify the resolved realpath target in all error/creation branches, enabling reads and writes to arbitrary host files outside allowed roots. Chained with indirect prompt injection or cloned untrusted repositories, attackers could modify shell startup files or exfiltrate SSH keys. Maintainers fixed symlink canonicalization via realpath checks across all filesystem operations.

Incident record

Reported
Severity
High
Vector
Tool/MCP Abuse
Affected system type
Model Context Protocol (MCP) Filesystem Servers
Reference
CVE-2025-53109
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-53109

Inspect in Interactive Incidents Hub

Defensive lesson

Resolve symbolic links via realpath() on both existing targets and parent directories before enforcing MCP workspace root containment.

Referenced techniques