Summary
validatePath returns an unresolved path for a dangling symlink, so the write tools follow a planted link and create files outside the allowed directories.
Where the bug is
- Confinement helper:
validatePathinhelper.go, the parent-directory fallback at line 75 - Write tools that go through it:
write_file,modify_file,copy_file,move_file,create_directory
How it works
validatePath uses filepath.EvalSymlinks to resolve the requested path and confirm it is inside an allowed directory. When EvalSymlinks reports that the target does not exist (os.IsNotExist, which is what a dangling symlink produces), the helper checks only the parent directory and returns the unresolved path instead of the resolved one.
So if someone has placed a dangling symlink inside an allowed directory that points outside it, a later write through any of the tools above follows that symlink and creates the target file outside the confined area. This only creates files. Existing files outside the allow-list are still rejected (line 79), and the attacker has to plant the symlink first. That is why it is rated Medium rather than High.
This is a different bug from the time-of-check to time-of-use race reported earlier as issue #63. In Traceforce's testing, the EvalSymlinks change proposed there does not address this separate dangling-symlink code path. It was reproduced end to end against the real server binary over its live MCP stdio transport. As a control, a symlink to an existing out-of-bounds file was still blocked while the dangling case got through. The build tested was the current main branch at commit ba3f07f, ahead of the v0.11.1 release tag. A fixed release is not yet available.
Impact
Successful exploitation allows creation of files outside the configured allowed directories, subject to the filesystem permissions of the account running the server.
How to fix it
- Maintainers: in the dangling-symlink branch, fully resolve the intended final path and re-check the resolved location against the allow-list before returning it. Reject writes whose final path component is a symlink that resolves, or would resolve, outside an allowed directory.
- Operators: keep the allowed directories to trusted locations, and do not grant the write tools over directories that untrusted parties can seed with symlinks.
Timeline
- 2026-08-21: Reported to the maintainer by Traceforce; re-verified live at v0.11.1.
- 2026-09-10: CVE ID assigned by MITRE.
How this differs from earlier CVEs
Symlink allow-list bypasses are already public in other MCP filesystem servers, but those are separate codebases and do not cover this Go server:
- CVE-2025-53109: Anthropic
@modelcontextprotocol/server-filesystem(Node/TypeScript) - CVE-2025-67364:
fast-filesystem-mcp(npm)
Credits
Discovered and reported by Abhijeet Kumar, Traceforce.
References
- Repository: github.com/mark3labs/mcp-filesystem-server
- Related, distinct: upstream issue #63 (a time-of-check to time-of-use race)

.webp)
.webp)

