Rightshold™ Sign up

Answers · MCP security

Can just connecting to a malicious remote MCP server run code on my computer? What was the mcp-remote vulnerability (CVE-2025-6514), and how do I protect myself?

Last updated

TL;DR: Yes, if the client mishandles what the server sends during sign-in, and it happened. CVE-2025-6514 (CVSS 9.6, published July 9, 2025, found by Or Peles of JFrog) affected mcp-remote versions 0.0.5 through 0.1.15, the npm proxy many people used to connect Claude Desktop, Cursor and Windsurf to remote MCP servers. When a server asked for OAuth, mcp-remote fetched its authorization-server metadata and passed the authorization_endpoint URL to the open npm package to launch a browser. On Windows that went through PowerShell, so a crafted value ran any command the attacker chose; on macOS and Linux it could launch an arbitrary executable with limited control over arguments. No tool call or click on anything suspicious was needed beyond adding the server and connecting. It's fixed in 0.1.16. The MCP security best practices now require clients to accept only https (or http on loopback for development) authorization URLs, reject javascript:, data:, file: and other schemes, and never open URLs through a shell. Upgrade or pin mcp-remote to 0.1.16 or later, prefer your client's built-in remote MCP support, connect only to servers you trust over https, and treat adding a remote server like installing software.

What should I check, step by step?

1. Find every mcp-remote entry in your MCP client configs (claude_desktop_config.json, .cursor/mcp.json, Windsurf and others) and pin a patched version in the args, for example "mcp-remote@0.1.16" or a later release, so you know which version runs instead of whatever npx resolves.

  1. Where your client supports remote MCP servers directly, use that instead of a local proxy. JFrog noted in July 2025 that Cursor, Windsurf and Claude Desktop (paid plans) had added direct remote connections.
  2. Connect only over https. JFrog's second attack scenario was a server reached over plain http on a local network, where anyone on the LAN who can intercept the traffic can play the malicious server.
  3. Add a remote server only if you know who runs it. A URL in a README, forum post or a teammate's config file is a request to let that server's operator send your client data that it will act on.
  4. If you build an MCP client or proxy, validate authorization URLs from server metadata before opening them: allow only https (http only for localhost, 127.0.0.1 or ::1 in development), reject every other scheme, and open them with a non-shell API, never cmd.exe, sh or PowerShell.
  5. Apply the same suspicion to the other URLs a server hands you during discovery: resource_metadata, authorization_servers and token_endpoint. The spec's SSRF section says to block private and link-local ranges, including 169.254.169.254 cloud metadata, and validate each redirect hop.
  6. Run MCP clients and local proxies as your normal user, never as administrator or root, and keep credentials such as SSH keys and cloud tokens out of what that user account can read where you can.
  7. If you ran an affected version against a server you don't fully trust, treat the machine as possibly compromised: check for unfamiliar processes and startup items and rotate credentials that were reachable from it.

How did the mcp-remote CVE-2025-6514 vulnerability work?

mcp-remote is a local stdio proxy: the client starts it with npx and the server's URL, and it forwards traffic to the remote server over HTTP. When the remote server answered 401, mcp-remote started the OAuth flow from the MCP TypeScript SDK: it fetched /.well-known/oauth-authorization-server, registered a client, built an authorization URL from the server's authorization_endpoint value with new URL(), added the query parameters, and called open() on it to start a browser.

How must MCP clients validate OAuth authorization URLs from a server?

The MCP security best practices (2026-07-28) have a section on OAuth authorization URL validation that names this class of bug: a malicious server supplying a javascript: URL that a client passes to window.open() (XSS), or a URL with shell metacharacters that a client opens through cmd.exe, PowerShell or a shell script (command execution).

Why is adding a remote MCP server a trust decision?

A remote MCP server controls more than its tool list. During connection and sign-in it supplies metadata URLs your client fetches and opens, and afterwards it supplies tool descriptions and results your model reads. CVE-2025-6514 was in the first part, before any tool was called, which is why reviewing a server's tools alone wouldn't have caught it.

How do I ask Rightshold about this (free, no key)?

Add the MCP server https://www.rightshold.com/mcp to Claude, Cursor, ChatGPT, Grok or VS Code, then ask: “Before I add this remote MCP server to my client, what does it serve right now, has that changed from what was recorded, and does any tool definition carry hidden text?”

One-click setup

{
  "tool": "precall_check",
  "arguments": {
    "url": "<the server's https MCP URL>"
  }
}

Rightshold reports what an MCP endpoint serves and what it has on record about it. It doesn't scan your machine or your MCP client configuration, check package versions, or detect compromise, and an unchanged answer isn't a finding that a server is safe to connect to.

What are the sources?

Related

Not legal advice. JSON · Markdown · All answers

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.rightshold.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export RIGHTSHOLD_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.rightshold.com/v1/licenses/check -H "Authorization: Bearer $RIGHTSHOLD_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'