UTC
Low

@modelcontextprotocol/server-filesystem list_directory_with_sizes follows symlinks and leaks outside-directory file metadata

GHSA-hhwq-wxfx-cj7g · published 2026-10-25

Severity
Low
CVSS score
3.1
Chance of exploitation (EPSS)
No CVE
Fixed in
No fix yet
What it is

An attacker who can place or preserve a symlink inside an allowed directory can cause an MCP client or agent to call list_directory_with_sizes and disclose metadata about files outside the allowed directory. The confirmed leaked field is file size. This can reveal the existence and approximate size of sensitive files such as private keys, local databases, credentials, or other user files when a symlink to those files is present in the allowed tree.

What to do

No fixed release is listed yet for @modelcontextprotocol/server-filesystem. Follow the source advisory for updates, and until one ships:

General guidance from ShieldPi, not a vendor fix

  • Path traversal. Limit the folders it can reach at the operating-system level, such as a container or a user with access to only those folders, and keep credentials and keys outside them.

Alternatively, use fs.lstat() and report symlink metadata without following the target. If target metadata is intentionally shown, the target must be resolved and checked against the allowed-directory policy before calling fs.stat().

Affected
PackageRegistryAffectedFixed in
@modelcontextprotocol/server-filesystemnpm>= 1.0.0, < 2.0.12.0.1
@modelcontextprotocol/server-filesystemnpm>= 2025.7.1, <= 2026.8.31No fix yet
Downstream in the Official MCP Registry

2 registered MCP servers install an affected version, by the dependency versions deps.dev resolved for a fresh install. The trace says when.

  • io.github.Wolfe-Jam/WJTTC@modelcontextprotocol/server-filesystem@2025.12.18
  • one.faf/wjttc@modelcontextprotocol/server-filesystem@2025.12.18
See the trace →

The impact, patch and workaround text comes from the advisory, shortened (published by the MCP reference servers project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by the MCP reference servers project (https://github.com/modelcontextprotocol/servers/security/advisories); advisories published by the MCP Inspector project (https://github.com/modelcontextprotocol/inspector/security/advisories); advisories published by the MCP TypeScript SDK project (https://github.com/modelcontextprotocol/typescript-sdk/security/advisories); advisories published by the MCP Go SDK project (https://github.com/modelcontextprotocol/go-sdk/security/advisories); advisories published by the MCP Java SDK project (https://github.com/modelcontextprotocol/java-sdk/security/advisories); advisories published by the MCP Kotlin SDK project (https://github.com/modelcontextprotocol/kotlin-sdk/security/advisories); advisories published by the MCP Rust SDK project (https://github.com/modelcontextprotocol/rust-sdk/security/advisories); advisories published by the MCP Ruby SDK project (https://github.com/modelcontextprotocol/ruby-sdk/security/advisories); advisories published by the MCP C# SDK project (https://github.com/modelcontextprotocol/csharp-sdk/security/advisories); advisories published by the MCP PHP SDK project (https://github.com/modelcontextprotocol/php-sdk/security/advisories); advisories published by the MCP Registry project (https://github.com/modelcontextprotocol/registry/security/advisories); advisories published by Open Terminal (https://github.com/open-webui/open-terminal/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-12-06. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].