Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-79534 Overview
CVE-2026-79534 is a directory traversal vulnerability in mark3labs/mcp-filesystem-server version 0.11.1. The flaw resides in the validatePath function inside filesystemserver/handler/helper.go. When filepath.EvalSymlinks returns os.IsNotExist for a dangling symlink, the fallback path validates only the parent directory and returns the unresolved path. Handlers such as write_file, modify_file, copy_file, move_file, and create_directory then follow a pre-existing dangling symlink located inside an allowed directory and create files outside the configured allowed directories.
Critical Impact
An attacker able to plant a dangling symlink inside an allowed directory can escape the sandbox and write arbitrary files anywhere the server process has permission.
Affected Products
- mark3labs mcp-filesystem-server version 0.11.1
- Model Context Protocol (MCP) deployments that expose filesystem tools using this server
- Any downstream integration bundling the vulnerable filesystemserver/handler package
Discovery Timeline
- 2026-09-29 - CVE-2026-79534 published to the National Vulnerability Database (NVD)
- 2026-09-29 - Last updated in NVD database
Technical Details for CVE-2026-79534
Vulnerability Analysis
The mcp-filesystem-server project enforces a sandbox by restricting file operations to a set of allowed directories. The validatePath helper is the single control point that resolves user-supplied paths, canonicalizes symlinks, and rejects paths that leave those directories. The vulnerability breaks that guarantee for symlinks whose target does not currently exist on disk.
When filepath.EvalSymlinks encounters a dangling symlink, it returns an error satisfying os.IsNotExist. The fallback branch in validatePath then only checks whether the parent directory of the requested path is inside an allowed directory. The unresolved path is returned to callers. Write-oriented handlers such as write_file, modify_file, copy_file, move_file, and create_directory then operate on that unresolved path and follow the dangling symlink at open time, creating the target file outside the sandbox.
Root Cause
The root cause is improper link resolution during path validation [CWE-59, CWE-22]. The fallback logic treats a missing symlink target as safe when the immediate parent is allowed, instead of resolving the link target and confirming it also falls within an allowed directory. Trust is placed in the syntactic parent rather than the semantic destination of the symlink.
Attack Vector
An attacker who can place a symlink inside an allowed directory, either directly or through another exposed MCP tool, points that symlink at an arbitrary absolute path that does not yet exist. They then invoke write_file (or any of the other affected handlers) against the symlink name. validatePath accepts the path because the parent is allowed and EvalSymlinks reports the target as missing. The subsequent write follows the symlink and creates the file at the attacker-chosen location, subject to the process user's permissions. This enables sandbox escape, tampering with configuration files, dropping executables into privileged paths, or overwriting SSH and cron artifacts.
No verified proof-of-concept code is published. See the Traceforce Security Advisory for additional technical details.
Detection Methods for CVE-2026-79534
Indicators of Compromise
- Symlinks inside allowed directories whose targets resolve to paths outside the configured allow list.
- File creation events originating from the mcp-filesystem-server process where the resulting inode lies outside any allowed directory.
- Unexpected writes to sensitive paths such as ~/.ssh/authorized_keys, /etc/cron.d/, or application configuration directories by the MCP server user.
Detection Strategies
- Audit repositories and deployment manifests for mark3labs/mcp-filesystem-server pinned to v0.11.1 or earlier.
- Enable filesystem auditing (Linux auditd with -F path watches, or macOS Endpoint Security) on directories exposed to the MCP server and alert on writes that traverse a symlink.
- Correlate MCP handler invocations (write_file, modify_file, copy_file, move_file, create_directory) with file creation events outside allowed directories.
Monitoring Recommendations
- Log all path arguments passed to the MCP server and record the resolved absolute path returned by validatePath.
- Monitor for creation of new symlinks inside allowed directories, especially those pointing to absolute paths outside the sandbox.
- Track process ancestry for the MCP server so that unexpected writes to system paths can be attributed quickly.
How to Mitigate CVE-2026-79534
Immediate Actions Required
- Upgrade mark3labs/mcp-filesystem-server to a fixed release once published by the maintainers; consult the Traceforce Security Advisory for version guidance.
- Restrict the allowed directories passed to the server to the narrowest set required, and ensure the server process runs as an unprivileged user.
- Scan allowed directories for existing dangling symlinks and remove any that were not created by trusted workflows.
Patch Information
Refer to the Traceforce Security Advisory and the upstream mark3labs/mcp-filesystem-server repository for the patched release. The fix must resolve the symlink target even when it does not exist and confirm the resolved destination lies inside an allowed directory before returning success from validatePath.
Workarounds
- Run the MCP server inside a chroot, container, or filesystem namespace so that any traversal is bounded by the isolation layer rather than by application logic.
- Mount allowed directories with nosymfollow where supported, or use a read-only bind mount when write operations are not required.
- Apply mandatory access controls such as AppArmor or SELinux profiles that constrain the server process to the allowed directories regardless of symlink targets.
# Example AppArmor confinement for the MCP filesystem server
/usr/local/bin/mcp-filesystem-server {
/srv/mcp/allowed/** rw,
deny /etc/** w,
deny /root/** rw,
deny /home/*/.ssh/** rw,
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

