CVE-2025-53109: @modelcontextprotocol/server filesystem @modelcontextprotocol/server-filesystem Allows For Path Validation Vulnerability
HIGHCVE-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
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.
npm install @modelcontextprotocol/server-filesystem@Latest secure release
npm install @modelcontextprotocol/server-filesystem@2025.7.1
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
CVE-2025-53109 Affected @modelcontextprotocol/server filesystem Versions
2 component(s)| 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?
Which @modelcontextprotocol/server filesystem versions are affected?
What version fixes CVE-2025-53109?
Is @modelcontextprotocol/server-filesystem affected?
What CWE is associated with CVE-2025-53109?
How can I check npm dependencies for CVE-2025-53109?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}