MCP Inspector can run attacker code when connecting to untrusted servers

HighSE Fix-First Score 43/100CVE-2025-58444SE-AIV-01581Script injection in the browserAI agents and assistantsMade public 9 Sep 2025

Download as PDF

What this means

A developer using MCP Inspector with an untrusted remote server could have their computer taken over. An attacker could run any command, steal files, install malware, or use the machine to attack other systems.

SecurityElites Manager Brief: the decision in one minute

MCP Inspector has a code injection flaw that runs attacker commands on a developer's machine if they connect to a malicious remote server. All developers using this tool need to upgrade immediately to block this attack.

SecurityElites Fix-First Score43 of 100
Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity.
SecurityElites fix windowWithin 30 days
High severity. This is our suggestion from common practice; your own policy comes first.
Who should own the fixDevelopment tools and infrastructure team.
Likely effortAbout 10 minutes: run the npm upgrade command and restart the Inspector. Longer if the team has custom deployment or container builds.

Questions to ask your team or supplier

  • Does your team ever connect MCP Inspector to servers you do not fully control or from outside your organization, and if so, since when?
  • Are your developers' machines already patched and confirmed to be running version 0.16.6 or later, and have you verified no untrusted servers were used before the upgrade?

Message you can forward to the owning team

Security notice: MCP Inspector can run attacker code when connecting to untrusted servers (CVE-2025-58444)

Severity: High
SecurityElites Fix-First Score: 43 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to @modelcontextprotocol/inspector 0.16.6 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2025-58444-mcp-inspector-can-run-attacker-code-when-connecting-to/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01581

What is at stake in your AI setup

  • API keys and credentials for AI providers: an attacker could steal these and use them to run expensive model queries or poison training.
  • Local model files and weights: an attacker could modify or delete them, corrupting your AI development.
  • Prompts and conversation history stored by the Inspector: an attacker could read sensitive project details or business logic.
  • Tools and external systems the Inspector can reach via the proxy: an attacker could use them to attack downstream systems or trigger unwanted actions.

Map where your company uses AI

Who is exposed

  • Developers who run MCP Inspector locally with remote servers (most at risk).
  • Teams that connect Inspector to servers outside their control or from unknown sources.
  • Development machines with access to production systems, keys, or source code.

Upgrades you need

SoftwareAffected versionsMove to
@modelcontextprotocol/inspector
npm
Every version before 0.16.60.16.6 or later

Am I affected?

Enter the version you run. Nothing you type is stored.

SecurityElites Developer Brief: the technical picture

Is it being attackedNo known attacks and no public attack code when CISA last reviewed it
Where the attacker must beAnywhere that can reach it over a network, including the internet if it is exposed
Account neededNone. No login is needed
Does a person have to do somethingYes, a deliberate action by a user
How hard it is to doEasy. It works reliably once the attacker can reach it
Risk of: data being readHigh
Risk of: data or settings being changedHigh
Risk of: the service being taken downHigh
Can attackers automate it at scaleNo, according to CISA. Each target needs manual work
How much control an attacker gainsTotal control of the affected software, according to CISA

Read from the official severity rating: 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

Kind of coding mistake

  • CWE-79: script can be injected into a web page
  • CWE-84
  • CWE-94: code can be injected

If you cannot upgrade today

  • Until you can upgrade, only connect MCP Inspector to remote servers you fully trust and control. Do not use it with public, untrusted, or third-party servers. Run it only on isolated machines without access to production systems or keys.

Signs it may already have been used against you

  • Review which remote MCP servers your developers connected to in the past month, especially any from outside your organization.
  • Check developer machine logs for unexpected command execution, new processes, or scheduled tasks created during times when Inspector was in use.
  • Look for outbound connections from development machines to unknown or unexpected external systems during Inspector sessions.
  • Review changes to files in development home directories or project folders that occurred during Inspector use, especially credential files or source code.

SecurityElites Fix Guide: step by step

  1. Find where MCP Inspector is installedCheck your project's package.json file or run npm list @modelcontextprotocol/inspector to see which version is installed.
  2. Back up your current setupIf you have local configuration or saved server connections in MCP Inspector, save a copy of those files in case you need to restore them after the upgrade.
  3. Upgrade to version 0.16.6 or laterRun npm install @modelcontextprotocol/inspector@0.16.6 (or use your package manager equivalent) to get the patched version. If using a global install, run npm install -g @modelcontextprotocol/inspector@0.16.6.
  4. Restart the InspectorClose any running Inspector windows or processes and start it again from the command line or your IDE.
  5. Confirm the new version is runningRun npm list @modelcontextprotocol/inspector or check the Inspector's version in its interface to confirm it shows 0.16.6 or later.
  6. Review recent server connectionsThink about which remote MCP servers you connected to in the past month. If any were untrusted or from unknown sources, treat your machine as potentially compromised and follow incident response steps.
  7. Check your machine for signs of compromiseReview recent command history, check for unexpected processes or scheduled tasks, and scan for malware if you connected to any untrusted servers before upgrading.

How to confirm it is fixed: Run npm list @modelcontextprotocol/inspector and confirm the installed version is 0.16.6 or later.

SecurityElites Quick Fixes: copy and paste

Upgrade @modelcontextprotocol/inspector with npmupgrade

npm install @modelcontextprotocol/inspector@0.16.6
npm ls @modelcontextprotocol/inspector

Check installed versionfor this issue

npm list @modelcontextprotocol/inspector

A starting content security policy (nginx)general hardening

add_header Content-Security-Policy "default-src 'self'; object-src 'none'; base-uri 'self'" always;

Test in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.

Let your AI coding assistant do the upgrade

Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.

Instruction for your coding assistant

You are helping me fix a security vulnerability (CVE-2025-58444) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n   - @modelcontextprotocol/inspector (npm): must be 0.16.6 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.

SecurityElites Incident Drill: could your team handle this?

Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.

What is the minimum version of MCP Inspector we need to run safely?A good answer: Version 0.16.6 or later; any version below that has the code injection flaw.
What could happen if a developer used MCP Inspector with an untrusted remote server before this was fixed?A good answer: An attacker could have run any command on that developer's machine, potentially stealing credentials, accessing source code, or installing malware.
What should we do if we believe we connected to an untrusted server with the old version?A good answer: Treat the machine as potentially compromised, review command history and system logs for signs of attack, and consider a security scan or incident response.
How do we confirm the upgrade worked and we are protected?A good answer: Check that npm list shows version 0.16.6 or later, restart the Inspector process, and verify it starts cleanly.

Run a full timed drill with your team

Ticket for your backlog

Paste into Jira, GitHub Issues or any tracker that reads Markdown.

Ready-made ticket

## MCP Inspector can run attacker code when connecting to untrusted servers (CVE-2025-58444)

**Severity:** High  |  **SE Fix-First Score:** 43/100  |  **Fix window:** Within 30 days
**Record:** SE-AIV-01581 https://securityelites.com/ai-vulnerabilities/cve-2025-58444-mcp-inspector-can-run-attacker-code-when-connecting-to/

### Why this matters
A developer using MCP Inspector with an untrusted remote server could have their computer taken over. An attacker could run any command, steal files, install malware, or use the machine to attack other systems.

### What to do
1. Find where MCP Inspector is installed
2. Back up your current setup
3. Upgrade to version 0.16.6 or later
4. Restart the Inspector
5. Confirm the new version is running
6. Review recent server connections
7. Check your machine for signs of compromise

Full steps: https://securityelites.com/ai-vulnerabilities/cve-2025-58444-mcp-inspector-can-run-attacker-code-when-connecting-to/

### Done when
- [ ] @modelcontextprotocol/inspector is at 0.16.6 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Run npm list @modelcontextprotocol/inspector and confirm the installed version is 0.16.6 or later.
- [ ] Logs were checked for signs of earlier use

SecurityElites Fix Tracker

Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.

Sign in to track this fix

Change history

  • 8 Sep 2025: Made public
  • 3 Dec 2026: Published

Official record

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>.

Weakness type: CWE-79, CWE-84, CWE-94

Use this record in your own tools

Get this record as JSON

curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2025-58444

For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker

The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 3 Dec 2026. Read the vendor advisory before changing a production system.