CVE-2025-6514: mcp-remote exposed to OS command injection via untrusted MCP server connections
mcp-remote 0.0.5 through 0.1.15 lets a malicious MCP server run operating-system commands on the client. The server returns a crafted authorization_endpoint during OAuth discovery, and mcp-remote passes it to the OS to open. Upgrade to 0.1.16.
Published Jul 9, 2025 · Analysis Nov 10, 2026
What an attacker can do
mcp-remote connects local MCP clients to remote servers. During OAuth discovery, the server answers the request to /.well-known/oauth-authorization-server with an authorization_endpoint field. mcp-remote passes it to new URL() and then to the open npm package, which launches it through the OS.
On Windows, open builds a PowerShell command around the value. JFrog's researchers used PowerShell subexpression syntax to inject commands, with a made-up URL scheme so spaces are not encoded. The result is full command execution with control of arguments. On macOS and Linux, open and xdg-open do not use a shell, so the researchers got execution of arbitrary executables with limited argument control.
The attacker needs the user to connect to a malicious or hijacked MCP server. They can also sit on the network path if the connection uses plain HTTP, and redirect it. The code then runs as the user, with access to their files and keys.
Who is affected
The npm package mcp-remote, versions 0.0.5 through 0.1.15. It is often run through npx from an MCP client config, so look there as well as in installed packages:
npm ls -g mcp-remoteSearch your MCP client config for mcp-remote entries and note which server URLs they point at.
mcp-remote
- Ecosystem
- npm
- Affected
- >= 0.0.5, < 0.1.16
- Fixed in
- 0.1.16
- Check
npm ls mcp-remote
How to fix it
Upgrade to 0.1.16. In client configs that run it through npx, pin the version:
npx [email protected] <server-url>JFrog also advises connecting only to trusted MCP servers and using HTTPS, which removes the network-path variant of the attack.
How to tell if you were hit
Look for unexpected child processes of the mcp-remote Node process, such as powershell.exe on Windows or unfamiliar executables elsewhere, started around the time of an OAuth connection. Review the MCP servers your clients connect to for URLs you did not add. Beam records agent shell commands and MCP tool calls, but this flaw triggers in the client before any tool call, so process logs are the better check.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
mcp-remote is exposed to OS command injection when connecting to untrusted MCP servers due to crafted input from the authorization_endpoint response URL
Questions
- Which mcp-remote version fixes CVE-2025-6514?
0.1.16. Versions 0.0.5 through 0.1.15 are affected.
- Is full command execution possible on Linux and macOS?
JFrog showed execution of arbitrary executables with limited parameter control there. Full command execution may be possible with more research.
- What triggers the flaw?
Connecting to a malicious or hijacked MCP server whose OAuth discovery response holds a crafted authorization_endpoint. A network attacker can also trigger it if the connection uses plain HTTP.
- Does using HTTPS fix it?
It closes the network attack variant but not a malicious server. Upgrade to 0.1.16 and connect only to trusted servers.
References
Read for this analysis:
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
