CVE-2025-53109: @modelcontextprotocol/server filesystem @modelcontextprotocol/server-filesystem Allows For Path Validation Vulnerability

HIGH
Advisory Identifier: GHSA-q66q-fx2p-7w4m
CWE-59
Published
Advisory Summary

CVE-2025-53109 is a HIGH @modelcontextprotocol/server-filesystem allows for path validation vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting @modelcontextprotocol/server filesystem libraries in the npm ecosystem. The issue involves @modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handling. Remediation is available by upgrading affected packages to version 2025.7.1.

CVE-2025-53109 at a Glance

CVE Identifier CVE-2025-53109
GHSA Identifier GHSA-q66q-fx2p-7w4m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product @modelcontextprotocol/server filesystem
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-53109

To remediate this vulnerability, upgrade all affected @modelcontextprotocol/server filesystem dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@modelcontextprotocol/server-filesystem fixed: Latest secure release
npm install @modelcontextprotocol/server-filesystem@Latest secure release
@modelcontextprotocol/server-filesystem fixed: 2025.7.1
npm install @modelcontextprotocol/server-filesystem@2025.7.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @modelcontextprotocol/server-filesystem

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-53109, inspect your project dependencies using npm:

npm ls @modelcontextprotocol/server-filesystem

Analyze the terminal output to locate any version of @modelcontextprotocol/server filesystem in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2025.7.1), your application is affected.

Note: The npm ls @modelcontextprotocol/server-filesystem command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In @modelcontextprotocol/server filesystem, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Versions of Filesystem prior to 0.6.3 & 2025.7.1 could allow access to unintended files via symlinks within allowed directories. Users are advised to upgrade to 2025.7.1 to resolve. Thank you to Elad Beber (Cymulate) for reporting these issues.

CVE-2025-53109 Affected @modelcontextprotocol/server filesystem Versions

2 component(s)
Fixed Versions:
2025.7.1
Product / Package Ecosystem Affected Versions Fixed Version
@modelcontextprotocol/server-filesystem
npm
≤ 0.6.2
@modelcontextprotocol/server-filesystem
npm
≥ 2025.1.14
< 2025.7.1
2025.7.1

References

Frequently Asked Questions

What is CVE-2025-53109?
CVE-2025-53109 is a security vulnerability in @modelcontextprotocol/server filesystem involving @modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handling under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which @modelcontextprotocol/server filesystem versions are affected?
Affected versions include releases prior to 2025.7.1 across affected packages: @modelcontextprotocol/server-filesystem.
What version fixes CVE-2025-53109?
Upgrading to 2025.7.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @modelcontextprotocol/server-filesystem affected?
Yes, @modelcontextprotocol/server-filesystem is affected in releases prior to Latest secure release, 2025.7.1. Upgrade your dependency to Latest secure release, 2025.7.1 or later.
What CWE is associated with CVE-2025-53109?
CVE-2025-53109 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check npm dependencies for CVE-2025-53109?
Run the dependency tree command: 'npm ls @modelcontextprotocol/server-filesystem'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q66q-fx2p-7w4m",
  "modified" : "2025-07-02T18:56:39Z",
  "published" : "2025-07-01T20:13:56Z",
  "aliases" : [ "CVE-2025-53109" ],
  "summary" : "@modelcontextprotocol/server-filesystem allows for path validation bypass via prefix matching and symlink handling",
  "details" : "Versions of Filesystem prior to 0.6.3 & 2025.7.1 could allow access to unintended files via symlinks within allowed directories. Users are advised to upgrade to 2025.7.1 to resolve.\n\nThank you to Elad Beber (Cymulate) for reporting these issues.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@modelcontextprotocol/server-filesystem"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.6.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@modelcontextprotocol/server-filesystem"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2025.1.14"
      }, {
        "fixed" : "2025.7.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/modelcontextprotocol/servers/security/advisories/GHSA-q66q-fx2p-7w4m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-53109"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/modelcontextprotocol/servers/commit/d00c60df9d74dba8a3bb13113f8904407cda594f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/modelcontextprotocol/servers"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-01T20:13:56Z",
    "nvd_published_at" : "2025-07-02T15:15:27Z"
  }
}