deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

MCP Inspector redirect flaw let untrusted MCP servers run commands on developer machines

A high-severity flaw in MCP Inspector let a malicious MCP server inject script through a redirect URI and reach arbitrary command execution on the developer's machine; version 0.16.6 fixes it.

MCP Inspector redirect flaw let untrusted MCP servers run commands on developer machines

A redirect that became script

According to an analysis published on dev.to, the vulnerability — tracked as CVE-2025-58444 and documented in advisory GHSA-g9hg-qhmf-q45m — affects the @modelcontextprotocol/inspector package in versions prior to 0.16.6. A redirect URI normally functions as navigation data, but in the affected flow the Inspector displayed the value returned by a remote MCP server in a context where encoded URI content could turn into running script. The flaw is classified as CWE-84, the improper neutralization of encoded URI schemes in a web page, and its CVSS v4 score is 8.6, placing it in the high severity band.

From browser script to shell commands

The injected script is only the first stage. As dev.to explains, a browser-side script inside a local development tool is not confined to the page that rendered the hostile string: it can call the Inspector's own local services, including the proxy that communicates with MCP servers. Because that proxy can start or influence a process on the developer's machine, the script's reach expands accordingly, ending in arbitrary command execution.

The prerequisite is that the developer connects the Inspector to an untrusted server and goes through the affected flow. That is a routine testing action rather than an attack on a hardened public service, which is what makes the scenario realistic. The resulting process can inherit everything a developer's account holds: repository access, cloud tokens, SSH keys, package registry credentials and shell history.

Upgrade and verify

Version 0.16.6 fixes the reported redirect path. The dev.to write-up urges developers to confirm the installed package version directly instead of assuming a container tag or global launcher already points at the patched release, and to sweep workstations and build images for older copies, particularly versions pinned inside example scripts or bundled tool distributions.

Beyond upgrading, the article recommends reviewing how the Inspector is launched. A proxy listening on every network interface is reachable from other machines even when the developer intended a local-only tool, so binding it to loopback, requiring authentication at any remote boundary, and keeping long-lived high-privilege tokens out of the shell that starts it are all advised. Unfamiliar MCP servers should be tested in a disposable account or container with restricted filesystem and cloud access, rather than in a session that inherits a production deployment token.

What to check afterwards

For a retrospective review, dev.to suggests starting with the package version and the launch command, then examining browser history and Inspector logs for connections to unfamiliar server URLs. Warning signs include redirects toward encoded javascript: or other unexpected URI schemes, bursts of proxy calls immediately after connecting to a server, and child processes that do not fit the developer's normal workflow.

The absence of a known incident is not proof that a machine was safe, the article notes: a compromised local tool tends to blend in because it touches the same files and credentials as legitimate work. Stale Inspector installations should be removed, and any tokens exposed on machines that ran an affected version should be rotated.

Why it matters

The flaw sits at the intersection of two trends: AI tooling that standardizes how applications connect to external services, and local developer utilities that hold near-complete control over a workstation. MCP Inspector exists precisely to connect to servers a developer may not fully trust, so hostile responses were always part of its threat model — and this bug shows how a single mishandled string in a redirect can escalate into code running with a developer's full authority. The patched release closes the specific redirect path, but the underlying lesson stands for anyone building or using local tooling: a response from an untrusted server must never be able to acquire the powers of a developer shell by accident, and testing unknown MCP servers belongs in an isolated environment rather than next to production credentials.

  • #mcp
  • #security
  • #developer-tools
  • #vulnerability
  • #model-context-protocol

Related posts