CVE-2025-57755 Overview
CVE-2025-57755 is a Cross-Origin Resource Sharing (CORS) misconfiguration in claude-code-router, an open-source tool that routes Claude Code requests to different language models. The improper CORS policy allows untrusted web origins to issue authenticated requests against the local router service. Attackers who lure a user to a malicious page can extract user API keys or equivalent credentials handled by the router. Stolen credentials enable account abuse, quota exhaustion, and access to sensitive model interactions. The maintainers patched the issue in version v1.0.34.
Critical Impact
Exploitation results in disclosure of API keys and credentials routed through claude-code-router, leading to unauthorized model access, billing abuse, and exposure of prompt and response data.
Affected Products
- claude-code-router versions prior to v1.0.34
- Deployments exposing the router HTTP interface to browsers without origin restrictions
- Developer workstations running the router alongside web browsing sessions
Discovery Timeline
- 2025-08-21 - CVE-2025-57755 published to NVD
- 2026-04-15 - Last updated in NVD database
Technical Details for CVE-2025-57755
Vulnerability Analysis
The vulnerability stems from a permissive CORS configuration in the claude-code-router HTTP service [CWE-200]. The router exposes endpoints that proxy requests to upstream model providers and store provider credentials such as API keys. When the service responds with overly broad Access-Control-Allow-Origin headers, browsers permit cross-origin scripts to read response bodies that contain credential material or credential-bearing configuration. An attacker hosting a malicious page can issue fetch requests to the router running on the victim's host and exfiltrate the response. The flaw is network-reachable and requires no authentication or user interaction beyond visiting an attacker-controlled site.
Root Cause
The root cause is missing origin validation in the router's CORS middleware. The service did not restrict allowed origins to a trusted set and did not properly gate credentialed endpoints. This violates the principle that sensitive local services must reject untrusted origins by default.
Attack Vector
An attacker delivers a malicious link or advertisement to a developer running claude-code-router on localhost. The attacker's JavaScript issues cross-origin requests to the router's API endpoints. The browser honors the permissive CORS response and returns the response body to the attacker's script. Captured API keys are then used to call paid model APIs, drain quotas, or read historical request data routed through the service.
No verified public exploit code is available. See the GitHub Security Advisory GHSA-8hmm-4crw-vm2c for vendor technical details.
Detection Methods for CVE-2025-57755
Indicators of Compromise
- Unexpected outbound API calls to model providers from credentials associated with claude-code-router users
- Browser DevTools or proxy logs showing cross-origin fetch or XMLHttpRequest calls to the router's listening port from non-local origins
- Spikes in token consumption or billing against accounts that hold keys configured in the router
Detection Strategies
- Inspect HTTP responses from the router for Access-Control-Allow-Origin: * or reflected arbitrary origins paired with Access-Control-Allow-Credentials: true
- Audit installed claude-code-router versions across developer endpoints and flag any release earlier than v1.0.34
- Correlate model provider audit logs with developer workstation activity to identify anomalous key usage patterns
Monitoring Recommendations
- Forward router access logs and host process telemetry to a centralized data lake for cross-correlation with browser and network activity
- Alert on processes binding to the router's listening port that accept connections initiated by browser parent processes
- Track API key usage from upstream providers and alert on geographic or volume anomalies
How to Mitigate CVE-2025-57755
Immediate Actions Required
- Upgrade claude-code-router to v1.0.34 or later on every affected workstation and build agent
- Rotate all API keys and provider credentials that were configured in vulnerable versions
- Review provider billing and audit logs for unauthorized usage during the exposure window
Patch Information
The maintainers fixed the CORS configuration in claude-code-routerv1.0.34. Refer to the GitHub Security Advisory GHSA-8hmm-4crw-vm2c for release details and remediation guidance.
Workarounds
- Bind the router strictly to 127.0.0.1 and block external interface exposure via host firewall rules
- Place the router behind a reverse proxy that enforces a strict allow-list of trusted origins
- Disable or remove claude-code-router on systems where an upgrade cannot be performed until patching is complete
# Upgrade claude-code-router to the patched release
npm install -g @musistudio/claude-code-router@1.0.34
# Verify the installed version
claude-code-router --version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

