# mcp-remote ran OS commands from a malicious MCP server's OAuth metadata (CVE-2025-6514)

Source: https://botpassword.com/incidents/2025-07-mcp-remote-oauth-command-injection
Disclosed: 2025-07-09 · Type: Vulnerability · Status: Resolved · Updated: 2026-10-25

JFrog disclosed in July 2025 that `mcp-remote` 0.0.5 through 0.1.15, a widely used npm proxy that lets local MCP clients such as Claude Desktop, Cursor and Windsurf connect to remote MCP servers, passed a server-supplied OAuth `authorization_endpoint` URL to the operating system unsafely. A malicious or hijacked MCP server could run commands on the user's machine and reach every credential stored there. Upgrade to 0.1.16 or later and connect only to trusted MCP servers over HTTPS.

Identifiers: CVE-2025-6514, JFSA-2025-001290844

## What was exposed

No exploitation in the wild was reported; this is a vulnerability that put credentials at risk. When a remote MCP server answers `mcp-remote` with HTTP 401, `mcp-remote` starts OAuth discovery and opens the server's `authorization_endpoint` in a browser using the `open` package. JFrog showed that a crafted value leads to **full OS command execution on Windows** (through PowerShell) and execution of arbitrary programs with limited arguments on macOS and Linux. A command run this way has the user's own access: MCP client config files with API keys, `.env` files, SSH keys, cloud CLI credentials and OAuth tokens for other services stored on the machine. An attacker on the same network could also trigger it against a server reached over plain HTTP.

## Who is affected

You are affected if an MCP client configuration (for example Claude Desktop's `claude_desktop_config.json` or Cursor's `mcp.json`) launches `npx mcp-remote` or a pinned `mcp-remote` version from 0.0.5 to 0.1.15, and you connected it to a server you do not fully control or to any server over HTTP. Configs that run `npx mcp-remote` without a version may still use an old cached copy, so check which version actually runs. Windows users carried the highest risk, because JFrog showed full command execution there.

## What to do

1. Update `mcp-remote` to 0.1.16 or later, and pin a fixed version in every MCP client config that launches it.
2. Connect only to MCP servers you trust, always over HTTPS. Prefer your client's native remote MCP support where it exists.
3. If you connected an old version to an unknown or untrusted server, rotate the API keys in your MCP configs and `.env` files, cloud and GitHub credentials, and the OAuth grants for other MCP servers on that machine.
4. Review your MCP client configs for servers you no longer use and remove them.

## Keys to rotate

- [Anthropic](https://botpassword.com/keys/anthropic)
- [OpenAI](https://botpassword.com/keys/openai)
- [GitHub](https://botpassword.com/keys/github)
- [AWS (IAM access keys)](https://botpassword.com/keys/aws)

## Timeline

- 2025-07-09: JFrog publishes CVE-2025-6514 (CVSS 9.6) and advisory JFSA-2025-001290844, affecting `mcp-remote` 0.0.5 through 0.1.15; the fix is version 0.1.16. ([source](https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability))
- 2025-07-09: NVD publishes the CVE, describing OS command injection from crafted input in the `authorization_endpoint` response URL. ([source](https://nvd.nist.gov/vuln/detail/CVE-2025-6514))

## Indicators

- `mcp-remote` versions 0.0.5 through 0.1.15.
- An `authorization_endpoint` in a server's OAuth metadata that is not an `https://` URL, for example a `file:` URL, as in JFrog's proof of concept.

## Sources

- https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability
- https://research.jfrog.com/vulnerabilities/mcp-remote-command-injection-rce-jfsa-2025-001290844/
- https://nvd.nist.gov/vuln/detail/CVE-2025-6514
