CVE-2025-58444: @modelcontextprotocol/inspector Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-g9hg-qhmf-q45m
CWE-84 CWE-94 CWE-79
Published
Advisory Summary

CVE-2025-58444 is a HIGH cross-site scripting vulnerability (CWE-84: Improper Neutralization of Encoded URI Schemes in a Web Page) affecting @modelcontextprotocol/inspector libraries in the npm ecosystem. The issue involves mcp inspector is vulnerable to potential command execution via xss when connecting to an untrusted mcp server. Remediation is available by upgrading affected packages to version 0.16.6.

CVE-2025-58444 at a Glance

CVE Identifier CVE-2025-58444
GHSA Identifier GHSA-g9hg-qhmf-q45m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-84: Improper Neutralization of Encoded URI Schemes in a Web Page
Affected Product @modelcontextprotocol/inspector
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-58444

To remediate this vulnerability, upgrade all affected @modelcontextprotocol/inspector 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/inspector fixed: 0.16.6
npm install @modelcontextprotocol/inspector@0.16.6
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/inspector

How to Check if You Are Affected

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

npm ls @modelcontextprotocol/inspector

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

Note: The npm ls @modelcontextprotocol/inspector 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-84: Improper Neutralization of Encoded URI Schemes in a Web Page, where the web application improperly neutralizes user-controlled input for executable script disguised with uri encodings. In @modelcontextprotocol/inspector, 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

An XSS flaw exists in the MCP Inspector local development tool when it renders a redirect URL returned by a remote MCP server. If the Inspector connects to an untrusted server, a crafted redirect can inject script into the Inspector context and, via the built-in proxy, be leveraged to trigger arbitrary command execution on the developer machine. Version 0.16.6 hardens URL handling/validation and prevents script execution. > Thank you to the following researchers for their reports and contributions: > * Raymond (Veria Labs) > * Gavin Zhong, <superboyzjc@gmail.com> & Shuyang Wang, <swang@obsidiansecurity.com>.

CVE-2025-58444 Affected @modelcontextprotocol/inspector Versions

1 component(s)
Fixed Versions:
0.16.6
Product / Package Ecosystem Affected Versions Fixed Version
@modelcontextprotocol/inspector
npm
< 0.16.6
0.16.6

References

Frequently Asked Questions

What is CVE-2025-58444?
CVE-2025-58444 is a security vulnerability in @modelcontextprotocol/inspector involving MCP Inspector is Vulnerable to Potential Command Execution via XSS When Connecting to an Untrusted MCP Server under CWE-84: Improper Neutralization of Encoded URI Schemes in a Web Page.
Which @modelcontextprotocol/inspector versions are affected?
Affected versions include releases prior to 0.16.6 across affected packages: @modelcontextprotocol/inspector.
What version fixes CVE-2025-58444?
Upgrading to 0.16.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @modelcontextprotocol/inspector affected?
Yes, @modelcontextprotocol/inspector is affected in releases prior to 0.16.6. Upgrade your dependency to 0.16.6 or later.
What CWE is associated with CVE-2025-58444?
CVE-2025-58444 is classified under CWE-84: Improper Neutralization of Encoded URI Schemes in a Web Page (The web application improperly neutralizes user-controlled input for executable script disguised with URI encodings.).
How can I check npm dependencies for CVE-2025-58444?
Run the dependency tree command: 'npm ls @modelcontextprotocol/inspector'. 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-g9hg-qhmf-q45m",
  "modified" : "2025-09-26T17:07:01Z",
  "published" : "2025-09-08T21:14:23Z",
  "aliases" : [ "CVE-2025-58444" ],
  "summary" : "MCP Inspector is Vulnerable to Potential Command Execution via XSS When Connecting to an Untrusted MCP Server",
  "details" : "An XSS flaw exists in the MCP Inspector local development tool when it renders a redirect URL returned by a remote MCP server. If the Inspector connects to an untrusted server, a crafted redirect can inject script into the Inspector context and, via the built-in proxy, be leveraged to trigger arbitrary command execution on the developer machine. Version 0.16.6 hardens URL handling/validation and prevents script execution.\n\n> Thank you to the following researchers for their reports and contributions:\n> * Raymond (Veria Labs)\n> * Gavin Zhong, <superboyzjc@gmail.com> & Shuyang Wang, <swang@obsidiansecurity.com>.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@modelcontextprotocol/inspector"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.16.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/modelcontextprotocol/inspector/security/advisories/GHSA-g9hg-qhmf-q45m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-58444"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/modelcontextprotocol/inspector/commit/650f3090d26344a672026b737d81586595bb1f60"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/modelcontextprotocol/inspector"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@modelcontextprotocol/inspector/v/0.16.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-84", "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-08T21:14:23Z",
    "nvd_published_at" : "2025-09-08T22:15:34Z"
  }
}