{"slug": "a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-doesn-t", "title": "A blog post could run commands on your laptop through MCP Inspector. What localhost doesn't protect", "summary": "Security researchers at Oligo Security disclosed CVE-2025-49596, a critical (CVSS 9.4) flaw in MCP Inspector, the official debugging tool for MCP servers, that let a malicious web page trigger arbitrary local commands through the tool's unauthenticated proxy on port 6277. The attack relied on the browser's willingness to send plain GET requests to 0.0.0.0 and on DNS rebinding, and worked even when the proxy was bound to 127.0.0.1. Anthropic fixed it in version 0.14.1 by adding a per-launch session token and an Origin allow-list, though follow-up advisories (GHSA-vcc9-3xgm-p9v4, GHSA-wmjf-2m46-2352) documented further bypasses fixed in 2.12.0 and 1.0.3.", "body_md": "This is the request Oligo Security used to show CVE-2025-49596:\n\n```\nhttp://0.0.0.0:6277/sse?transportType=stdio&command=touch&args=%2Ftmp%2Fexploited-from-the-browser\n```\n\nPort 6277 is where MCP Inspector's proxy listened. Inspector is the official tool for poking at an MCP server while you build it: a web UI on one port, and a proxy on another that connects to your server. `transportType=stdio` told the proxy to start the server as a local process, and `command` and `args` said which process. Before version 0.14.1 the proxy asked for no token, so it started whatever it was given. In the demo that was `touch`. A reverse shell fits in the same two parameters.\n\nThe request came from a web page. Oligo's example was a blog post about MCP with a bit of JavaScript in it. You read it while Inspector runs in another terminal, and the script sends that request to your machine.\n\nA browser won't let a page read a response from another origin, but it still sends a plain GET. For most local services that's harmless, because nothing happens until someone reads the answer. Inspector did the work on receipt, so the page never needed to see the response.\n\nThen the address. `0.0.0.0` reaches services on your own machine, and browsers don't treat it with the suspicion they give `localhost` and private IPs. Oligo called this out in 2024 as the \"0.0.0.0-day\", and their write-up on this CVE says Chromium and Firefox still let it through. They showed DNS rebinding as a second route: a domain that first resolves to the attacker's server and then to `127.0.0.1`, so the browser keeps treating the page and your local port as the same site.\n\nOligo also notes the attack worked even when the proxy listened only on `127.0.0.1`. Listening on loopback decides which machine can connect, and the browser on that machine was the way in.\n\nThe score is 9.4 under CVSS 4.0, from GitHub's advisory. The only thing it needs from you is the page visit.\n\nOligo reported it to Anthropic on 18 April 2025, and the fix shipped on 13 June in 0.14.1. It put two checks in front of the sensitive routes: a random session token generated at each launch, the way Jupyter does it, and an allow-list for the Origin header. Inspector opens the UI with the token in the URL, so your tab has it and a page on another site doesn't. The Origin check is for the browser routes, since a cross-site request carries the attacker's origin. It also changed the proxy's default bind from every interface to `127.0.0.1`, which keeps other machines off the port but, as Oligo showed, not the browser on yours.\n\nBoth were published as advisories on the Inspector repo on 21 October 2026, a bit over a year later.\n\nIn the v2 rewrite, versions 2.0.0 to 2.11.0, it was DNS rebinding again ([GHSA-vcc9-3xgm-p9v4](https://github.com/modelcontextprotocol/inspector/security/advisories/GHSA-vcc9-3xgm-p9v4), fixed in 2.12.0). The Origin check let through any request with no Origin header, and browsers leave it off same-origin GETs. Nothing checked the Host header. And `GET /`, which sat outside the protected routes, served the page with the API token written into it. After a rebind the attacker's page fetched `/` as a same-origin request, read the token, and used it to read the stored OAuth tokens and local client config. Starting a process still failed, because that endpoint is a POST and browsers do send Origin on a POST. Every OAuth token Inspector held was readable anyway.\n\nThe older line, 0.14.1 to 1.0.2, had a gap that only matters if you turned the token off with `DANGEROUSLY_OMIT_AUTH` ([GHSA-wmjf-2m46-2352](https://github.com/modelcontextprotocol/inspector/security/advisories/GHSA-wmjf-2m46-2352), fixed in 1.0.3). The Origin check was then the only thing left, and it also waved through requests with no Origin header. A browser sends one on the POST that starts a process. A script talking to the port directly doesn't have to. So with that flag set, anything that could reach the port without a browser could launch processes.\n\nThe current Inspector binds `127.0.0.1` by default, generates a token per launch (or takes yours from `MCP_INSPECTOR_API_TOKEN`), checks Origin and Host against allow-lists, and refuses an all-interfaces `HOST` unless you also set `DANGEROUSLY_BIND_ALL_INTERFACES`. Its docs say why in one line: the backend spawns processes on request.\n\nTwo settings undo most of that. `DANGEROUSLY_OMIT_AUTH=true` removes the token. `DANGEROUSLY_BIND_ALL_INTERFACES` puts the backend on your network, and the Docker image sets it because inside a container it has to. That's why the Docker docs tell you to publish the port as `-p 127.0.0.1:6274:6274`. A bare `-p 6274:6274` publishes it on every interface of your machine.\n\nNone of this is specific to Inspector. Any dev tool that opens a port while you work can be checked the same way in a couple of minutes. (For MCP servers you write yourself, the [MCP security checklist](https://dev.to/bloqarl/an-mcp-security-checklist-for-developers-wiring-agents-to-real-tools-l71) I posted in October covers the server side.)\n\nSee what's listening, and on which address:\n\n```\n# macOS and Linux\nlsof -nP -iTCP -sTCP:LISTEN\n\n# Linux\nss -ltnp\n```\n\n`127.0.0.1:<port>` is loopback only. `*:<port>`, `0.0.0.0:<port>` or `[::]:<port>` is every interface, so anyone on the same wifi can connect.\n\nThen for each one:\n\n`curl -i` it with no cookies. If you get in without a token, the only thing between it and a web page is what it does with the Origin and Host headers.`export PRIVATE_KEY=...` for `forge script` and then start a local tool from the same terminal, every process that tool starts has the key too.\n*Adapted from a piece our team published on [zealynx.io](https://www.zealynx.io/research/adversarial-security/cve-2025-49596-mcp-inspector-rce?utm_source=devto&utm_medium=article&utm_campaign=mcp-inspector-rce). It adds the disclosure dates, the two October 2026 advisories on gaps in that fix, the current Inspector defaults and the checks for other local tools, and drops the OWASP mapping.*\n\n*I wrote this with help from AI for drafting and editing. The opinions and the audit experience are mine.*", "url": "https://wpnews.pro/news/a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-doesn-t", "canonical_source": "https://dev.to/bloqarl/a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-localhost-doesnt-protect-13cf", "published_at": "2026-12-01 13:41:22+00:00", "updated_at": "2026-12-01 13:44:01.632795+00:00", "lang": "en", "topics": ["ai-safety", "ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["Oligo Security", "MCP Inspector", "Anthropic", "Model Context Protocol", "GitHub", "CVE-2025-49596", "GHSA-vcc9-3xgm-p9v4", "GHSA-wmjf-2m46-2352"], "also_reported_by": [], "takeaway": "MCP Inspector before 0.14.1 let any visited web page start local processes via an unauthenticated proxy on port 6277, and binding to 127.0.0.1 did not stop it because the browser itself was the entry point.", "recommendation": {"advice": "Require a per-launch session token and strict Origin and Host checks on local MCP tooling, and never expose a command-executing proxy to browser-reachable routes, since loopback binding alone does not block DNS rebinding.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-doesn-t", "markdown": "https://wpnews.pro/news/a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-doesn-t.md", "text": "https://wpnews.pro/news/a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-doesn-t.txt", "jsonld": "https://wpnews.pro/news/a-blog-post-could-run-commands-on-your-laptop-through-mcp-inspector-what-doesn-t.jsonld"}}