NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2025-67364: fast-filesystem-mcp has a Path Traversal vulnerability

highCVSS 3.1 7.5GHSA-j893-m93w-jwjw

fast-filesystem-mcp 3.4.0 and earlier check file paths with `path.resolve()`, which does not follow symlinks. A symlink inside an allowed directory that points outside it lets `fast_read_file` and related tools read restricted files. The package data lists no patched version.

Published Jan 7, 2026 · Updated Jan 8, 2026 · Analysis Nov 1, 2026

What an attacker can do

The safePath and isPathAllowed functions validate the path string the caller gives, using path.resolve(). That function normalizes .. segments but does not resolve symbolic links to their real location. The validated path then goes to fs.open(), which follows the link. A symlink at /home/user/test.txt that points to /usr/user/test.txt passes a check that allows /home and denies /usr, and the tool reads the restricted file.

The attacker needs a symlink inside an allowed directory and a way to call the tool. An AI agent connected to this MCP server is the usual caller. A prompt injection or a malicious repository can plant the link, or an agent can be steered to create one, and the agent then reads files such as keys or credentials outside the allowed directories and returns them in the conversation. The advisory scores 7.5 with high confidentiality impact only, so the flaw exposes data but does not change it.

Who is affected

The npm package fast-filesystem-mcp at version 3.4.0 and earlier. Check the install:

npm ls -g fast-filesystem-mcp

If the server runs through npx from an MCP client config, check the version pinned in that config. Look for symlinks inside the directories you allow:

find /path/to/allowed/dir -type l

fast-filesystem-mcp

Ecosystem
npm
Affected
<= 3.4.0
Fixed in
No patched version yet
Check
npm ls fast-filesystem-mcp

How to fix it

The package data shows no patched version. The upstream issue (number 10) reports the bug in 3.4.0. The maintainer said they would add fs.realpath() validation, and the issue was closed by the reporter without a linked fix. I could not confirm a release that fixes it. The reporter's recommended fix is to resolve each path with fs.realpath() and check the resolved path against the allowed directories.

Until a fixed release exists, allow only directories that contain no symlinks you do not control, run the server under an account that cannot read sensitive files, and consider a different filesystem MCP server that resolves real paths.

How to tell if you were hit

Look for symlinks in allowed directories that point outside them. Review MCP client logs for fast_read_file calls on paths that resolve through a link to locations such as /etc, ~/.ssh or other users' folders. Compare readlink -f of each requested path with your allowed list. Beam's agent hooks record the tool actions an agent proposes, which helps show which reads an agent attempted.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

fast-filesystem-mcp version 3.4.0 contains a critical path traversal vulnerability in its file operation tools including fast_read_file. This vulnerability arises from improper path validation that fails to resolve symbolic links to their actual physical paths. The safePath and isPathAllowed functions use path.resolve() which does not handle symlinks, allowing attackers to bypass directory access restrictions by creating symlinks within allowed directories that point to restricted system paths. When these symlinks are accessed through valid path references, the validation checks are circumvented, enabling access to unauthorized files.

Questions

Is there a patched version of fast-filesystem-mcp?

The package data lists none. The upstream issue says the maintainer planned fs.realpath() validation, but I could not confirm a release that contains it.

Which tools are affected?

The advisory names fast_read_file and says the file operation tools share the flawed path validation in safePath and isPathAllowed.

Does an attacker need local access?

They need a symlink inside an allowed directory and a way to call the tool, typically through an AI agent connected to the server. The CVSS vector rates it as network-reachable with no privileges.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries