The server validated a directory path while it was inside an allowed root. A concurrent replacement of that path with a symlink could redirect subsequent list_directory or search_files traversal into a location outside the approved root. The reported result was disclosure of directory or file names on a tested Linux configuration. The patch changes how the…
Inspect the ClaimsCase · DiggingBeagle record
MCP filesystem listing could reveal names outside an allowed directory after symlink replacement
A time-of-check to time-of-use symlink swap let listing and search return outside-directory names.
Published by DiggingBeagle:
@modelcontextprotocol/server-filesystem before 2.4.0; attacker can replace an allowed directory entry with a symlink at the relevant time on the tested filesystem.
Assessment profile
Assessment method- Setting
- research demonstration
- Exploitation
- demonstrated
- Evidence
- Grade B
- Remediation
- patch available
- AI role
- AGAINST AI
Basis and provenance
Vendor or researcher primary evidence establishes the stated mechanism and its bounds; the public record does not support a population-wide impact score, prevalence or generalization to installations without the prerequisites.
Assessed Nov 21, 2026 using diggingbeagle.assessment/1.
Evidence basis: CLM-2026-NOV21-FS-MCP-SYMLINK-1 · CLM-2026-NOV21-FS-MCP-SYMLINK-2 · CLM-ENR271-FS-MCP-SYMLINK · Maintainer advisory: MCP filesystem listing could reveal names outside an allowed directory after symlink replacement
At a glance
The directory was authorized before the filesystem was read, but a local process could rename it and install a symlink before the subsequent readdir. The documented effect is disclosure of entry names and types through listing tools, including a two-user test where the attacker could not list the directory directly. It does not establish reads of protected…
Read the implicationsThe finding does not demonstrate reading the contents of the files whose names were listed. It depends on an attacker-controlled filesystem race and has no reported production victim.
Limits and uncertaintyFull account
The server validated a directory path while it was inside an allowed root. A concurrent replacement of that path with a symlink could redirect subsequent list_directory or search_files traversal into a location outside the approved root. The reported result was disclosure of directory or file names on a tested Linux configuration. The patch changes how the server resolves and checks directory traversal.
The finding does not demonstrate reading the contents of the files whose names were listed. It depends on an attacker-controlled filesystem race and has no reported production victim.
Mechanism and trust boundary
- 01
Directory passes permitted-root check
A filesystem listing tool validates a directory inside allowedDirectories while another local process can rename it.
Boundary: validated directory path -> time of filesystem access
- 02
Directory swapped before listing
The process replaces that directory with a link to an outside location before readdir, revealing entry names and types rather than file contents.
Boundary: allowed directory namespace -> external directory listing
Claims & evidence
CLM-ENR271-FS-MCP-SYMLINKThe maintainer reports a two-user Linux reproduction in which four directory-listing tools returned names from outside allowedDirectories after a symlink swap.supported
Basis: reported finding
- supportsMaintainer advisory: MCP filesystem listing could reveal names outside an allowed directory after symlink replacementprimary disclosure
Summary: four listing tools and two-user Linux reproduction
CLM-2026-NOV21-FS-MCP-SYMLINK-1A time-of-check to time-of-use symlink swap let listing and search return outside-directory names.supported
Basis: reported finding
- supportsMaintainer advisory: MCP filesystem listing could reveal names outside an allowed directory after symlink replacementprimary disclosure
GHSA-rq2p-q7c4-6g27: symlink swap, directory listing and corrected 2.4.0 release
CLM-2026-NOV21-FS-MCP-SYMLINK-2The original maintainer advisory does not establish a known number of real victims or a measured criminal campaign.supported
Basis: reported finding
- supportsMaintainer advisory: MCP filesystem listing could reveal names outside an allowed directory after symlink replacementprimary disclosure
Advisory context: reported scope and exploitation information
Implications
The directory was authorized before the filesystem was read, but a local process could rename it and install a symlink before the subsequent readdir. The documented effect is disclosure of entry names and types through listing tools, including a two-user test where the attacker could not list the directory directly. It does not establish reads of protected file contents, and the local rename prerequisite matters.
Controls and mitigations
- Apply the vendor-provided fixed version where established and restrict network and filesystem rights independently of the model.
- Replay the documented path with a low-privilege synthetic account and verify the result at the actual side-effect boundary.
Unknowns and contradictions
- The finding does not demonstrate reading the contents of the files whose names were listed. It depends on an attacker-controlled filesystem race and has no reported production victim.
Sources and citation
Material revision history
- Nov 21, 2026 · Published version · first publication · revision 272