AccuroAI
Book a demo

Resources / MCP Server Risk Directory / Filesystem MCP Server

Is the Filesystem MCP Server safe? Risks, permissions and safe setup

Individual developers and desktop agent users giving Claude Desktop or IDE agents read and write access to local project folders. Here is what an AI agent can do through it, its published vulnerabilities and how to set it up safely.

Baseline risk

25Medium
  • Capabilities: 15 of 40
  • Read-plus-exfiltrate: no
  • Hidden instructions (publicly verified): none known
  • Third-party publisher: +10

Before your own factors: version pinning, number of users and policy coverage. How we score

Maker
Model Context Protocol project (modelcontextprotocol/servers)
Publisher
MCP project reference server
Runs
Local (runs on the device)
Transport
stdio, streamable-http
Authentication
none (local process permissions); access limited to allowed directories given as command-line arguments
Tools
16
Built-in limits
Allowed directories as command-line arguments; --read-only and --read-only-dir <path>; --confine-roots limits MCP Roots to the command-line directories
License
MIT
Source
github.com/modelcontextprotocol/servers/tree/main/src/filesystem
Last verified
2026-11-23

What an agent can do through it

Reads local files · 5Writes or deletes local files · 10
ToolTypeWhat it does
read_text_fileReadReads a text file inside the allowed directories
read_multiple_filesReadReads many files in one call
search_filesReadRecursively searches for files by pattern (capped at 100,000 entries)
directory_treeReadReturns a recursive tree of a directory
write_fileWriteCreates or overwrites a file (destructiveHint true)
edit_fileWriteApplies edits to an existing file (destructiveHint true)
move_fileWriteMoves or renames files and directories (destructiveHint true)
copy_fileWriteCopies a file

Known vulnerabilities

IDIssuePublishedFixed in
GHSA-q66q-fx2p-7w4m / CVE-2025-53109
High (CVSS 4.0 8.4)
Path validation bypass via symlink handling Affected: < 0.6.3 and < 2025.3.28.2025-07-010.6.3 and 2025.7.01
GHSA-hc55-p739-j48w / CVE-2025-53110
High (CVSS 4.0 7.3)
Path validation bypass via colliding path prefix Affected: < 0.6.3 and < 2025.3.28.2025-07-010.6.3 and 2025.7.01
GHSA-4gxg-m5jx-9j57
Moderate (CVSS 5.3)
Case-variant path bypasses symlink check and allows creating files outside allowed directories in server-filesystem Affected: >= 1.0.0, < 2.0.1; and 2026.8.31.2026-10-252.0.1
GHSA-7rgq-gccq-qphx
Moderate (CVSS 4.2)
Path traversal via trailing quote/whitespace in validatePath (Check/Use Mismatch) Affected: >= 2025.8.21, <= 2026.8.31; >= 1.0.0, < 2.0.1.2026-10-252.0.1
GHSA-53mr-w429-c597
Low (CVSS 2.2)
Parent-Directory Fallback TOCTOU in @modelcontextprotocol/server-filesystem Permits Arbitrary File Write Outside allowedDirectories Affected: >= 2025.1.14, <= 2026.8.31; < 2.0.1.2026-10-252.0.1 (partial on Windows)
GHSA-hhwq-wxfx-cj7g
Low (CVSS 3.1)
@modelcontextprotocol/server-filesystem list_directory_with_sizes follows symlinks and leaks outside-directory file metadata Affected: >= 2025.7.1, <= 2026.8.31; >= 1.0.0, < 2.0.1.2026-10-252.0.1
GHSA-p9cv-8g75-4xcg
Moderate (CVSS 4.4)
Symlink swap after validation lets read_text_file return files outside allowedDirectories Affected: < 2.3.0; >= 2025.1.14, <= 2026.8.31.2026-11-112.3.0
GHSA-7m4x-rv66-mxhh
Moderate (CVSS 5.0)
server-filesystem: move_file's same-device rename leaves the source unpinned, so a swapped source parent moves an outside file into the allowed directories Affected: < 2.3.0; >= 2025.1.14, <= 2026.8.31.2026-11-112.3.0
GHSA-rq2p-q7c4-6g27
Low (CVSS 2.2)
Symlink swap after validation lets the directory-listing tools return entry names from outside allowedDirectories Affected: < 2.4.0; >= 2025.1.14, <= 2026.8.31.2026-11-182.4.0

Main risks

Sandbox escape through symlinks, path tricks and race conditions

ASI02 Tool Misuse and Exploitation

Nine published advisories (two High, CVE-2025-53109 and CVE-2025-53110) show reads and writes escaping allowedDirectories through symlinks, prefix collisions, case variants and swap races. The README says Windows junction swaps still cannot be fully prevented.

Unpinned installs stay on vulnerable date-versioned releases

ASI04 Agentic Supply Chain Vulnerabilities

The official npx example has no version, and the advisories note package managers rank 2.x below the 2025.x and 2026.x date versions, so existing installs are not offered the fix. Users must install 2.4.0 or later explicitly.

Injected instructions overwrite or plant files

LLM01:2025 Prompt Injection

If a file the agent reads contains instructions, the model can call write_file, edit_file or move_file on anything in the allowed directories. That can corrupt code, config or dotfiles placed inside a broad allowed path.

Secrets in allowed directories flow into the model context

LLM02:2025 Sensitive Information Disclosure

read_multiple_files and search_files make it easy to pull .env files, keys or tokens that sit in an allowed directory. The server has no network tool, but any other connected tool can then send that data out.

Network exposure in HTTP mode

ASI03 Identity and Privilege Abuse

The HTTP transport binds 127.0.0.1:3001 by default, but HOST=0.0.0.0 exposes file access to other machines with no auth. Anyone who reaches it gets the server's file permissions.

How to set it up safely

  1. Install @modelcontextprotocol/server-filesystem@2.4.0 or later explicitly with a pinned version; do not rely on upgrades from 2025.x or 2026.x date versions.
  2. Pass only narrow project directories as arguments, never your home directory, and keep .env files and keys outside them.
  3. Use --read-only, or --read-only-dir <path> for directories the agent should only read.
  4. Use --confine-roots so client-supplied MCP Roots cannot widen access beyond the command-line directories.
  5. Do not allow directories that untrusted local users can write to, especially on Windows where junction swaps remain possible.
  6. Keep the default 127.0.0.1 bind in HTTP mode; never set HOST=0.0.0.0.
  7. Prefer the Docker image with a bind mount of only the project folder, and add OS-level read-only mounts where possible.
  8. Avoid pairing it in the same session with a server that can send data out (fetch, email, chat) unless reads are limited to non-sensitive paths.

How we score

Baseline scores use the method from our guide to scoring every MCP server on employee laptops. Score the servers in your own environment with the free MCP Server Risk Checklist.

1. What the server can do (capped at 40)

  • Sends messages externally: 15
  • Fetches arbitrary URLs: 15
  • Writes to code repositories: 15
  • Reads and writes databases: 15
  • Writes or deletes local files: 10
  • Automates a browser: 10
  • Reads and writes SaaS data: 10
  • Reads local files: 5
  • Runs code or commands: 15 (added for this directory)
  • Changes cloud infrastructure: 15 (added for this directory)
  • Moves money or changes payments: 15 (added for this directory)

2. What we found

  • Read-plus-exfiltrate: reads sensitive data and can also send data out: 20
  • Hidden instructions in a tool description (publicly verified): 30, and always Critical
  • Third-party: not published by the maker of the system it connects to: 10

3. Band

0–24 Low · 25–49 Medium · 50–74 High · 75–100 Critical.

This is a baseline. The full method also adds points for unpinned package versions, how many employees use the server and whether a policy covers it; those depend on your setup, so check them in your own environment.

How AccuroAI helps

The AccuroAI Endpoint Agent finds the MCP servers configured in AI clients on managed devices and lists the tools each local server exposes. Each server gets a risk level with its capabilities, and you can block a server once in the console to enforce the block on every device: Claude Code and Cursor refuse calls to it, and for other clients the agent stops the server process. Tool calls from coding agents can be graded by risk, then allowed, confirmed with the employee or blocked.

MCP security · MCP server inventory · How to red team an MCP server

Questions about the Filesystem MCP Server

Is the Filesystem MCP Server safe to use?

It can be, with the right setup. At baseline it scores 25 (Medium) in the AccuroAI method because an agent using it can reads local files, writes or deletes local files. Limit its scopes or tools, keep a person in the loop for write actions and pin the version you reviewed.

Does the Filesystem MCP Server have known vulnerabilities?

Yes. 9 published issues are listed on this page with the affected versions and the fix, as of 2026-11-23. Update to a fixed version and check the maker's advisories before approving a new release.

How do I restrict the Filesystem MCP Server?

Use the controls the maker provides: Allowed directories as command-line arguments; --read-only and --read-only-dir <path>; --confine-roots limits MCP Roots to the command-line directories. Then grant the narrowest token or account, approve the server centrally and block other copies of it.

MCP Security
Find every copy of Filesystem MCP Server on your fleet

AccuroAI finds the MCP servers configured in AI clients on managed devices, gives each a risk level and blocks a server across the fleet.

Book a demoStart a free pilot

Finds MCP servers on managed devices · Risk level per server · Block a server across the fleet