@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
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.
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().
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @modelcontextprotocol/server-filesystem | npm | >= 1.0.0, < 2.0.1 | 2.0.1 |
| @modelcontextprotocol/server-filesystem | npm | >= 2025.7.1, <= 2026.8.31 | No fix yet |
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
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- CriticalVibe-Trading FastAPI endpoints permit unauthenticated access, file upload, and an RCE chainvibe-trading-ai
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- Highfilesystem: --read-only-dir bypass on case-insensitive Linux mounts@modelcontextprotocol/server-filesystem
- High@modelcontextprotocol/server-filesystem vulnerability allows for path validation bypass via colliding path prefix@modelcontextprotocol/server-filesystem
- High@modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handling@modelcontextprotocol/server-filesystem
- Mediumfilesystem: non-UTF-8 allowed directory resolves to a sibling symlink@modelcontextprotocol/server-filesystem
- Mediumfilesystem: --read-only-dir bypass via move_file and intermediate symlinks@modelcontextprotocol/server-filesystem
- Mediumcreate_directory: NFC-twin symlink race creates dirs in --read-only-dir@modelcontextprotocol/server-filesystem
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.