A critical remote code execution (RCE) flaw in the open-source mcp-remote tool was revealed Wednesday by JFrog researchers.The vulnerability, tracked as CVE-2025-6514, has a CVSS score of 9.6 and could potentially lead to full system compromise when connecting an AI client to a malicious remote Model Context Protocol (MCP) server, or via a man-in-the-middle attack by a local attacker, according to JFrog.The mcp-remote project enables AI clients to connect to remote MCP servers, even when the client only supports local MCP connection.This allows AI and large language model (LLM) tools to access resources outside of the user’s local environment, such as external cloud storage and databases.The mcp-remote tool is widely used for this purpose and is mentioned in Cloudflare documentation as a way to connect the Claude Desktop client to a remote MCP server. The flaw discovered by JFrog and patched promptly last month by mcp-remote maintainer Glen Maddern would have allowed an attacker to send arbitrary commands to the victim’s machine via a crafted response during the authentication/authorization process.Ordinarily, when connecting to a remote MCP server, the open() function would be used to open a browser page for the user to log in. In the proof-of-concept (PoC) attack, the URL for this browser window is altered to include malicious commands that are executed by the open() function.In a simple demonstration of this attack, JFrog replaced the log in URL, in the “authorization_endpoint” field, with the file path for the Windows Calculator app, forcibly opening the app.The attack could be further expanded on Windows machines to include arguments by abusing the PowerShell subexpression operator $() and using an unrecognized URI scheme to prevent the command from being passed through the URL() constructor function. This allows the attacker to inject a command with arguments as a string to be evaluated, without spaces being encoded to %20 by the URL() constructor, achieving full command execution.The attack is more limited on macOS and Linux machines, where arbitrary executables can be run with limited parameter control, the JFrog researchers noted.CVE-2025-6514 affects mcp-remote versions 0.0.5 to 0.1.15 and was patched in version 0.1.16. The patch adds URL sanitization to prevent the execution of arbitrary commands sent from the MCP server to the client machine.While using the latest version of mcp-remote is the best way to prevent an attack, users should also ensure they are only connecting to trusted remote MCP servers when utilizing AI clients.
AI/ML, Vulnerability Management, Patch/Configuration Management
Critical mcp-remote flaw could enable RCE when connecting AI clients

An In-Depth Guide to AI
Get essential knowledge and practical strategies to use AI to better your security program.
Get daily email updates
SC Media's daily must-read of the most current and pressing daily news
You can skip this ad in 5 seconds



