# CVE-2025-6514 mcp-remote OAuth authorization\_endpoint RCE

- ID: cve-2025-6514-mcp-remote-rce
- Reported: 2025-07-09
- Researcher: Or Peles / JFrog
- Organization: JFrog
- AI role: ai_agent_or_mcp_as_target (Agent / MCP as target)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: 2026-10-20
- Entry page: https://openattacks.ai/attacks/cve-2025-6514-mcp-remote-rce/
- Entry JSON: https://openattacks.ai/api/attacks/cve-2025-6514-mcp-remote-rce.json
- Browse title: mcp-remote OAuth authorization\_endpoint RCE (CVE-2025-6514)
- Editorial summary: A malicious or intercepted MCP server could return a crafted OAuth URL that runs commands through PowerShell on Windows. CVSS 9.6; fixed in mcp-remote 0.1.16.
- Evidence class (catalog annotation): Vulnerability report
- Source-stated target environments: Agents & MCP; Windows
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/cve-2025-6514-mcp-remote-rce.json

## Technique
Critical OS command injection in mcp-remote 0.0.5–0.1.15. Malicious or MITM MCP server returns crafted OAuth authorization\_endpoint; client opens URL and on Windows PowerShell executes injected commands. CVSS 9.6. Fixed in 0.1.16.

## Stack relevance (editorial)
Assessment: mapped. Editorial applicability reviewed against the catalog source account; not a scan or independent incident verification.
First action: Check the vendor advisory and update the affected client; review remote MCP OAuth destinations.
- Relationship: target; tools: mcp-remote; OS scope: windows; requires existing MCP connections: true.
  Relevance: mcp-remote is the affected MCP client in the source account.
  Condition to check: Confirm that the installed version is affected by the historical report; selecting a product does not establish its version or patch status.
  Condition to check: The reported command-injection path depends on Windows OAuth URL handling and an untrusted remote MCP server.
  Evidence: https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/ ; https://github.com/advisories/GHSA-6xpm-ggf7-wc3p ; https://nvd.nist.gov/vuln/detail/cve-2025-6514
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
Connect mcp-remote client to untrusted/compromised remote MCP server

## AI tooling and models
- [mcp-remote](https://github.com/punkpeye/mcp-remote)
- MCP OAuth discovery

## Other tooling
- open()/PowerShell sink class

## Victims and sectors
unknown

## Target geography
- unknown

## Attribution
unknown

## Scale and metrics
CVSS 9.6 Critical

## Attack flow
Catalog reconstruction of the supplied source account. Unknowns and research caveats are preserved.
### step-1: Client connects to an untrusted server [access]
An attacker-controlled, compromised or intercepted remote MCP connection is used.
Evidence: https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/ ; https://github.com/advisories/GHSA-6xpm-ggf7-wc3p ; https://nvd.nist.gov/vuln/detail/cve-2025-6514

### step-2: Server returns OAuth discovery data [ai]
The response supplies a crafted authorization\_endpoint URL.
Evidence: https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/ ; https://github.com/advisories/GHSA-6xpm-ggf7-wc3p ; https://nvd.nist.gov/vuln/detail/cve-2025-6514

### step-3: Browser-opening helper invokes PowerShell [execution]
On affected Windows clients the URL is interpreted as a command-injection payload.
Evidence: https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/ ; https://github.com/advisories/GHSA-6xpm-ggf7-wc3p ; https://nvd.nist.gov/vuln/detail/cve-2025-6514

### step-4: Commands execute locally [impact]
Affected mcp-remote versions permit OS command execution; the report identifies a fixed version.
Evidence: https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/ ; https://github.com/advisories/GHSA-6xpm-ggf7-wc3p ; https://nvd.nist.gov/vuln/detail/cve-2025-6514

Connections:
- step-1 -> step-2
- step-2 -> step-3
- step-3 -> step-4

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### step-1: Agent trust / configuration changes
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/mcp-config.sigma.yml
- KQL query download: /api/detections/mcp-config.kql
- SPL query download: /api/detections/mcp-config.spl
- Hunt hypothesis: A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.
- Required telemetry: File changes and before/after content for MCP / IDE configuration; Repository audit / pull-request history; Agent startup and tool-invocation logs
- Investigate: Diff command, args, environment, origin, autoApprove and task settings against the previously approved version.
- Investigate: Correlate the author and change with the next agent launch; inspect path canonicalization and trailing-dot variants where relevant.
- Limitation: A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.
- Qualification: Review server origin and connection configuration against the approved inventory; a remote connection alone is not exploitation.
- No direct MagicSword prevention claim is recorded for this stage.

### step-2: Unexpected agent tool use
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: custom_schema
- SIGMA query download: /api/detections/agent-tools.sigma.yml
- KQL query download: /api/detections/agent-tools.kql
- SPL query download: /api/detections/agent-tools.spl
- Hunt hypothesis: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.
- Required telemetry: Agent tool-call audit records with session / tool / destination; Tool-definition and approval changes; Endpoint process, file-access and network evidence where available
- Investigate: Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
- Investigate: Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.
- Limitation: Process logs cannot recover model intent. Remote connectors and in-process interpreters may produce no local child process. Prompt content alone is not a reliable signature.
- No direct MagicSword prevention claim is recorded for this stage.

### step-3: Suspicious Windows script execution
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: native
- SIGMA query download: /api/detections/windows-shell.sigma.yml
- KQL query download: /api/detections/windows-shell.kql
- SPL query download: /api/detections/windows-shell.spl
- Hunt hypothesis: A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.
- Required telemetry: Windows process creation: Sysmon Event 1 or Defender DeviceProcessEvents; PowerShell script-block logging when enabled; Download / network and installer events
- Investigate: Follow the parent and child process tree and recover the script or URL from logs without executing it.
- Investigate: Correlate the payload's signer/hash, persistence, and network activity; baseline approved automation.
- Limitation: Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.
- Conditional MagicSword policy: Use MagicSword application control to restrict an unneeded Windows shell/helper or deny unapproved payloads while the vulnerable client is patched.
- Policy scope: Windows clients with an enforced policy restricting the helper; update mcp-remote as the primary remediation.
- Policy limitation: Policy opportunity, not tested incident coverage. Requires enrolled Windows devices, a policy covering the actual executable, and enforcement. Audit mode records decisions without blocking; allowed tools and in-process / cloud actions can remain reachable.
- Policy reference: https://www.magicsword.io/use-cases/application-control?utm_source=openattacks&utm_medium=referral&utm_content=stage-control

### step-4: Suspicious Windows script execution
- Visibility: Defender-side logs where collected
- Query origin: catalog_authored; status: draft; log scope: native
- SIGMA query download: /api/detections/windows-shell.sigma.yml
- KQL query download: /api/detections/windows-shell.kql
- SPL query download: /api/detections/windows-shell.spl
- Hunt hypothesis: A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.
- Required telemetry: Windows process creation: Sysmon Event 1 or Defender DeviceProcessEvents; PowerShell script-block logging when enabled; Download / network and installer events
- Investigate: Follow the parent and child process tree and recover the script or URL from logs without executing it.
- Investigate: Correlate the payload's signer/hash, persistence, and network activity; baseline approved automation.
- Limitation: Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
No source-backed mapping is currently recorded.

## Defensive notes
Upgrade mcp-remote ≥0.1.16; argv not shell for URLs; trust only pinned MCP origins

## Sources
- https://jfrog.com/blog/2025-6514-critical-mcp-remote-rce-vulnerability/
- https://github.com/advisories/GHSA-6xpm-ggf7-wc3p
- https://nvd.nist.gov/vuln/detail/cve-2025-6514
