NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MCP Inspector

CVE-2025-58444: MCP Inspector is Vulnerable to Potential Command Execution via XSS When Connecting to an Untrusted MCP Server

highCVSS 4.0 8.6GHSA-g9hg-qhmf-q45m

MCP Inspector before 0.16.6 renders an OAuth authorization URL from a remote MCP server without checking its scheme. A malicious server can return a `javascript:` URL and run script in the Inspector page. Through the Inspector's built-in proxy, that script can trigger command execution on the developer's machine. Fixed in @modelcontextprotocol/inspector 0.16.6.

Published Sep 8, 2025 · Updated Sep 26, 2025 · Analysis Nov 1, 2026

What an attacker can do

When the Inspector connects to an MCP server that requires OAuth, the server supplies the authorization URL. The Inspector client used it as a link target and in window.location.href and window.open calls without limiting the protocol. An untrusted server can return a javascript: or data: URL. When the user follows the OAuth flow, such as the link in the OAuth flow progress view or the Auth Debugger redirect, the script runs in the Inspector origin.

That origin is trusted by the Inspector's local proxy, which can launch MCP servers over stdio. Script in the page can ask the proxy to start an arbitrary command. The result is code execution on the developer machine under the developer's account, with access to source, SSH keys and cloud credentials.

The attacker needs no account. They need the developer to point the Inspector at their server and to click through the auth step (the vector marks user interaction as active).

Who is affected

@modelcontextprotocol/inspector before 0.16.6, run through npx or installed locally. Only connections to untrusted or third-party MCP servers expose you. Check:

npm ls @modelcontextprotocol/inspector
npx @modelcontextprotocol/inspector --help

If you launch the Inspector with npx without a pinned version, check the version in the npx cache, since it can be stale.

@modelcontextprotocol/inspector

Ecosystem
npm
Affected
< 0.16.6
Fixed in
0.16.6
Check
npm ls @modelcontextprotocol/inspector

How to fix it

Upgrade to 0.16.6:

npm install @modelcontextprotocol/[email protected]

For npx use, pin it: npx @modelcontextprotocol/[email protected]. The fix commit adds a shared validateRedirectUrl that parses the URL and accepts only http: and https:. Other schemes raise the error "Authorization URL must be HTTP or HTTPS." redirectToAuthorization, the Auth Debugger and the OAuth flow progress view all call it now. The sources list no workaround beyond not connecting to untrusted servers.

How to tell if you were hit

Look for the error text "Authorization URL must be HTTP or HTTPS." in patched clients, which shows a server tried a non-web scheme. On an unpatched machine, check shell history and process lists for child processes spawned by the Inspector's proxy (node) that you did not request, and for browser history entries with a javascript: URL. Review which MCP servers developers connected the Inspector to.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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, & Shuyang Wang, .

Credited to cai0duque.

Questions

Do I need to be connected to a malicious server to be hit?

Yes. The flaw triggers from the OAuth authorization URL returned by the remote MCP server, so only connections to untrusted servers are exposed. The user must also follow the auth step.

How does XSS become command execution here?

Script running in the Inspector page can call the Inspector's built-in proxy, which starts MCP server processes on the local machine. That gives arbitrary command execution as the developer.

Which version fixes CVE-2025-58444?

0.16.6 of @modelcontextprotocol/inspector. It restricts authorization URLs to http and https.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More MCP Inspector vulnerabilities

All MCP Inspector entries