mcp-remote OAuth authorization_endpoint RCE (CVE-2025-6514)
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.
What happened
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.
How it happened
Read the flow as text & sources
A catalog reconstruction of the supplied source account. Unknown steps remain explicit; an edge describes the reported relationship between steps.
- 01 · Client connects to an untrusted server
An attacker-controlled, compromised or intercepted remote MCP connection is used.
Hunt: A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.
A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.
Source for step 1 - 02 · Server returns OAuth discovery data
The response supplies a crafted authorization_endpoint URL.
Hunt: Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.
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.
Source for step 2 - 03 · Browser-opening helper invokes PowerShell
On affected Windows clients the URL is interpreted as a command-injection payload.
Hunt: A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.
Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.
MagicSword policy opportunity · Windows clients with an enforced policy restricting the helper; update mcp-remote as the primary remediation.
Source for step 3 - 04 · Commands execute locally
Affected mcp-remote versions permit OS command execution; the report identifies a fixed version.
Hunt: A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.
Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.
Source for step 4
Why it matters
Reported entry point: Connect mcp-remote client to untrusted/compromised remote MCP server. Reported impact: Affected mcp-remote versions permit OS command execution; the report identifies a fixed version.
Check these source-linked conditions against your setup.
mcp-remote is the affected MCP client in the source account.
Conditions to check- Confirm that the installed version is affected by the historical report; selecting a product does not establish its version or patch status.
- The reported command-injection path depends on Windows OAuth URL handling and an untrusted remote MCP server.
Source-linked applicability guidance. Confirm current scope in the original report.
What you can do
Protection & prevention
Check the vendor advisory and update the affected client; review remote MCP OAuth destinations.
Upgrade mcp-remote ≥0.1.16; argv not shell for URLs; trust only pinned MCP origins
Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.
Detection queries
Draft query starters grouped by the attack stages where they apply.
Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.
01Client connects to an untrusted serverAgent trust / configuration changesCustom schema · Draft
An attacker-controlled, compromised or intercepted remote MCP connection is used.
What to look for
A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.
Review server origin and connection configuration against the approved inventory; a remote connection alone is not exploitation.
Visibility: Defender-side logs where collected
Required logs
- File changes and before/after content for MCP / IDE configuration
- Repository audit / pull-request history
- Agent startup and tool-invocation logs
Coverage limit. A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Agent trust / configuration changes
id: 2dfc8034-d66b-42a7-a699-a76b2ef872ac
status: experimental
description: A repository, dependency or agent changes MCP commands,
automatic-task settings, tool approval or model-routing configuration before
new execution.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- agent.config.write
- agent.approval.change
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.config.write", "agent.approval.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("agent.config.write", "agent.approval.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Diff command, args, environment, origin, autoApprove and task settings against the previously approved version.
- Correlate the author and change with the next agent launch; inspect path canonicalization and trailing-dot variants where relevant.
02Server returns OAuth discovery dataUnexpected agent tool useCustom schema · Draft
The response supplies a crafted authorization_endpoint URL.
What to look for
Untrusted content or a changed tool definition precedes a file read, command, or remote call outside the user's intended task.
Visibility: Defender-side logs where collected
Required logs
- Agent tool-call audit records with session / tool / destination
- Tool-definition and approval changes
- Endpoint process, file-access and network evidence where available
Coverage limit. 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.
Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.
Sigma
title: Hunt - Unexpected agent tool use
id: c709e384-0e11-479e-ab4d-3a06e2431e4b
status: experimental
description: Untrusted content or a changed tool definition precedes a file
read, command, or remote call outside the user's intended task.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: application
product: openattacks_audit
definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
Target and CorrelationId from the required source logs first.
detection:
selection:
EventType:
- agent.tool.call
- agent.tool.definition.change
condition: selection
KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.tool.call", "agent.tool.definition.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated descSPL
sourcetype="openattacks:audit"
EventType IN ("agent.tool.call", "agent.tool.definition.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _timeInvestigation steps
- Join input provenance, tool descriptions and calls by session ID and compare the action to the approved task.
- Inspect child processes and destinations; record whether execution was in-process, local, or through a remote SaaS connector.
03Browser-opening helper invokes PowerShellSuspicious Windows script executionNative logs · Draft
On affected Windows clients the URL is interpreted as a command-injection payload.
What to look for
A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.
Visibility: Defender-side logs where collected
Required logs
- Windows process creation: Sysmon Event 1 or Defender DeviceProcessEvents
- PowerShell script-block logging when enabled
- Download / network and installer events
Coverage limit. Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.
Windows process candidates. Sigma uses normalized process_creation fields; KQL requires Defender for Endpoint; SPL requires the Sysmon XML sourcetype. Tune collectors, fields and baselines before use.
Sigma
title: Hunt - Suspicious Windows script execution
id: 2bb88802-9f03-4d99-a192-fe44c9484e8b
status: experimental
description: A script host or shell runs encoded content, a remote URL, or
inline script syntax, then downloads or launches a payload.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- \powershell.exe
- \pwsh.exe
- \mshta.exe
- \wscript.exe
- \cscript.exe
CommandLine|contains:
- -enc
- http
- FromBase64String
- "javascript:"
- "vbscript:"
condition: selection
KQL
// Draft hunt; requires Defender for Endpoint process telemetry for this OS.
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe")
| where ProcessCommandLine contains "-enc" or ProcessCommandLine contains "http" or ProcessCommandLine contains "FromBase64String" or ProcessCommandLine contains "javascript:" or ProcessCommandLine contains "vbscript:"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1
| order by Timestamp descSPL
sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
Image IN ("*\\powershell.exe", "*\\pwsh.exe", "*\\mshta.exe", "*\\wscript.exe", "*\\cscript.exe")
CommandLine IN ("*-enc*", "*http*", "*FromBase64String*", "*javascript:*", "*vbscript:*")
| table _time host User Image CommandLine ParentImage ParentCommandLine
| sort - _timeInvestigation steps
- Follow the parent and child process tree and recover the script or URL from logs without executing it.
- Correlate the payload's signer/hash, persistence, and network activity; baseline approved automation.
04Commands execute locallySuspicious Windows script executionNative logs · Draft
Affected mcp-remote versions permit OS command execution; the report identifies a fixed version.
What to look for
A script host or shell runs encoded content, a remote URL, or inline script syntax, then downloads or launches a payload.
Visibility: Defender-side logs where collected
Required logs
- Windows process creation: Sysmon Event 1 or Defender DeviceProcessEvents
- PowerShell script-block logging when enabled
- Download / network and installer events
Coverage limit. Encoded commands and remote administration can be legitimate. This does not cover every script host, in-process execution, or non-Windows branch.
Windows process candidates. Sigma uses normalized process_creation fields; KQL requires Defender for Endpoint; SPL requires the Sysmon XML sourcetype. Tune collectors, fields and baselines before use.
Sigma
title: Hunt - Suspicious Windows script execution
id: 2bb88802-9f03-4d99-a192-fe44c9484e8b
status: experimental
description: A script host or shell runs encoded content, a remote URL, or
inline script syntax, then downloads or launches a payload.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
- Authorized activity matching this broad hunt; baseline and investigate
before alerting.
level: low
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- \powershell.exe
- \pwsh.exe
- \mshta.exe
- \wscript.exe
- \cscript.exe
CommandLine|contains:
- -enc
- http
- FromBase64String
- "javascript:"
- "vbscript:"
condition: selection
KQL
// Draft hunt; requires Defender for Endpoint process telemetry for this OS.
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe")
| where ProcessCommandLine contains "-enc" or ProcessCommandLine contains "http" or ProcessCommandLine contains "FromBase64String" or ProcessCommandLine contains "javascript:" or ProcessCommandLine contains "vbscript:"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA1
| order by Timestamp descSPL
sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
Image IN ("*\\powershell.exe", "*\\pwsh.exe", "*\\mshta.exe", "*\\wscript.exe", "*\\cscript.exe")
CommandLine IN ("*-enc*", "*http*", "*FromBase64String*", "*javascript:*", "*vbscript:*")
| table _time host User Image CommandLine ParentImage ParentCommandLine
| sort - _timeInvestigation steps
- Follow the parent and child process tree and recover the script or URL from logs without executing it.
- Correlate the payload's signer/hash, persistence, and network activity; baseline approved automation.
Technical detailsTooling, impact
Attack context
- AI's role
- Agent / MCP as target
- Initial access
- Connect mcp-remote client to untrusted/compromised remote MCP server
Tooling as reported
AI products, models and artifacts
- mcp-remote
- MCP OAuth discovery
Other tooling
- open()/PowerShell sink class
Targets and reported impact
- Reported scale / exposure
- CVSS 9.6 Critical
Detection rules
- Review attack-specific indicatorsGUIDANCE
Monitor for the techniques described in CVE-2025-6514 mcp-remote OAuth authorization_endpoint RCE. Refer to sources for specific IOCs and TTPs.
Source defensive notes
Upgrade mcp-remote ≥0.1.16; argv not shell for URLs; trust only pinned MCP origins
Sources & research credit
3 sourcesResearch by Or Peles / JFrog · JFrog
Record & downloads
- Source record name
- CVE-2025-6514 mcp-remote OAuth authorization_endpoint RCE
- Entry ID
- cve-2025-6514-mcp-remote-rce
- Catalog review
- October 20, 2026
- Category
- attacks-on-ai
- AI involvement confidence
- confirmed