OAuth Discovery as an RCE Vector CVE-2025-6514 in mcp-remote... #1708
+33
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This blog discusses CVE-2025-6514, a critical OS command injection (CWE-78) in
mcp-remote, a proxy used by MCP (Model Context Protocol) clients such as Claude Desktop, Cursor, and Windsurf to connect local STDIO-only MCP clients to remote HTTP(S) MCP servers. The article focuses less on new exploit primitives and more on the architectural security failure in OAuth-based discovery for autonomous agents.Context and impact. CVE-2025-6514 affects
m...🔧 Technical DetailsAbusing OAuth discovery with a malicious authorization_endpoint. The core trick is to exploit OAuth/OIDC discovery in automated clients: if a client asks a server for OAuth metadata and then opens the returned
authorization_endpointusing OS-level helpers without strict validation, an attacker can supply a non-HTTP(S) URL or file URI pointing to a local executable (e.g.,file:/c:/windows/system32/calc.exe). Any agent or desktop client that uses this pattern can be turned into a remote code execution vector whenever it connects to an untrusted or MITM-controlled server. To generalize this, always examine whether server-controlled metadata is passed directly into browser/URL opening APIs and ensure only well-formed, safe schemes and hosts are allowed.Recognizing and eliminating trust inversion in agent OAuth flows. Agent-based systems often let arbitrary servers dictate where and how the agent should authenticate...
🤖 Agent Actions
Updated
src/pentesting-web/oauth-to-account-takeover.mdwith a new section on OAuth/OIDC Discovery URL Abuse & OS Command Execution, detailing how malicious MCP servers weaponizeauthorization_endpointvalues to trigger local OS handlers (per CVE-2025-6514), exploitation workflow, generalized conditions, and hardening guidance (scheme pinning, IdP allowlists, capability-based delegation, patched versions). Added the Amla Labs research URL to the References section.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).