DEV Community

StarkMan
StarkMan

Posted on

The MCP Inspector proxy trusted a redirect and inherited command execution

The MCP Inspector proxy trusted a redirect and inherited command execution

Local developer tools sit in a useful but dangerous position. They run on a developer workstation, can often launch processes, and connect to servers supplied by the same user. MCP Inspector was built to test those servers, so a hostile server was always part of its threat model.

The advisory GHSA-g9hg-qhmf-q45m describes CVE-2025-58444 in @modelcontextprotocol/inspector before 0.16.6. A malicious redirect URI returned by an untrusted remote MCP server could inject script into the Inspector interface. The Inspector's proxy then provided a path from that script execution to arbitrary commands on the developer machine. The advisory rates it high at 8.6 under CVSS v4.

The redirect became executable page content

A redirect URI is normally treated as navigation data. In this flow, the Inspector rendered the returned value in a context where encoded URI content could become executable script. The issue is classified as CWE-84, improper neutralization of encoded URI schemes in a web page.

That first step still matters after the XSS is contained. A browser-side script inside a local development tool is not limited to the page that displayed the malicious string. It can call the Inspector's own local services, including the proxy that communicates with MCP servers. If that proxy can start or control a process, the script's authority grows with it.

The attacker needs the developer to connect the Inspector to an untrusted server and interact with the affected flow. That is a realistic testing action, not a remote attack against a hardened public service. The impact is high because the resulting process may have the developer's repository access, cloud tokens, SSH keys, package registry credentials, and shell history.

Upgrade before testing another unfamiliar server

Version 0.16.6 fixes the reported problem. Confirm the installed package version rather than assuming that a container tag or global launcher points at the fixed release. Search developer workstations and build images for older Inspector installations, especially copies pinned in example scripts or tool bundles.

After upgrading, review how the Inspector is launched. A proxy that listens on every interface is reachable from other hosts even if the developer intended a local-only tool. Bind it to loopback where possible, require authentication at any remote boundary, and avoid persistent high-privilege tokens in the shell that launches it.

Treat untrusted MCP servers as executable code suppliers. Test them in a disposable account or container with limited filesystem and cloud access. Do not let the test process inherit a production deployment token simply because the server is expected to answer a few tool calls.

What to look for in a workstation review

Start with the package version and the launch command. Then inspect browser history and Inspector logs around connections to unfamiliar server URLs. Look for redirects to encoded javascript: or unexpected schemes, repeated proxy calls immediately after a server connection, and child processes that do not match the developer's normal workflow.

The absence of a known incident does not prove the tool was safe. A compromised local tool can look like ordinary developer activity because it uses the same files and credentials. Remove stale Inspector installations, rotate any tokens exposed to a workstation that ran an affected version, and keep MCP testing separate from production administration.

This is not a case for banning local AI tooling. It is a case for treating the tool's local proxy as a privileged execution boundary. The patch closes the identified redirect path, but the broader rule remains: an untrusted server response must never inherit the power of a developer shell by accident.

References

Top comments (0)