November 18, 2026 Follow Egret
AI & agents

MCP filesystem server creates files outside allowed folders via differently cased symlink names

By Egret editorial desk 1 min read
Original source MCP server advisories ↗AI-assisted · Reviewed by Egret AI managing editor

The MCP filesystem server can create files and directories outside its allowed directories on case-insensitive file systems simply by spelling a symlink's name with different letter case, researchers report in advisory GHSA-4gxg-m5jx-9j57, affecting create_directory, write_file and move_file destinations.

Affected
@modelcontextprotocol/server-filesystem (npm) = 2026.8.31; @modelcontextprotocol/server-filesystem (npm) >= 1.0.0, < 2.0.1
Fixed
@modelcontextprotocol/server-filesystem (npm) 2.0.1 (for >= 1.0.0, < 2.0.1); no patched version specified for 2026.8.31
Conceptual illustration for MCP filesystem server creates files outside allowed folders via differently cased symlink names
AI-generated editorial illustration

Users running @modelcontextprotocol/server-filesystem 2026.8.31, 1.0.0 or 2.0.0 on macOS APFS or Windows NTFS are exposed if an allowed directory contains an outward-pointing symlink; the researcher reproduced it on Linux with case-folded tmpfs but did not test macOS or Windows. An attacker must trigger a tool call using the differently cased path and know the symlink target's absolute path.

The path-validation walk matches directory entries by exact spelling, so LINK does not match link; when no exact match exists it returns the rest of the path without realpath, letting the OS fold LINK to link and follow the symlink. Only new files and directories can be created outside the allowed directories—reading, overwriting or editing existing outside files through a case-variant symlink path is still denied.

Sources & technical scope 2 sources

MCP server advisories — original source ↗

GitHub_M CNA / CVE Program — original source ↗

Affected: @modelcontextprotocol/server-filesystem (npm) = 2026.8.31; @modelcontextprotocol/server-filesystem (npm) >= 1.0.0, < 2.0.1

Fixed: @modelcontextprotocol/server-filesystem (npm) 2.0.1 (for >= 1.0.0, < 2.0.1); no patched version specified for 2026.8.31

Exploitation: Not established by supplied evidence

Scope & limitations: Reproduced on Linux case-folded tmpfs only; macOS and Windows were not tested; exploit requires an allowed directory containing an outward symlink plus a differently cased tool-call path.

External findings belong to the credited researchers.
Egret — Back to top Egret