UTC
Medium

Path traversal via trailing quote/whitespace in validatePath (Check/Use Mismatch)

GHSA-7rgq-gccq-qphx · published 2026-10-25

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

An attacker who can influence the arguments of a filesystem tool (for example via prompt injection in a document, webpage, or codebase the LLM is reading) can cause read, write, move, and stat operations to occur on files outside the configured allowed directories. Confidentiality: read of files outside the sandbox if a sibling path with a trailing quote/whitespace exists. Integrity: write and move of files outside the sandbox under the same precondition. Chaining: the write tools can create the sibling path, making the precondition trivially satisfiable. This bypasses the boundary the server claims to enforce ("Only works within allowed directories").

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.
Affected
PackageRegistryAffectedFixed in
@modelcontextprotocol/server-filesystemnpm>= 1.0.0, < 2.0.12.0.1
@modelcontextprotocol/server-filesystemnpm>= 2025.8.21, <= 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].