GHSA-v8vw-gw5j-w7m6
Fix: modelcontextprotocol/registry#1227GHSA-v8vw-gw5j-w7m6 is a security vulnerability in github.com/modelcontextprotocol/registry. O3 Security confirms whether GHSA-v8vw-gw5j-w7m6 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
MCP Registry has open redirect via protocol-relative path in trailing-slash middleware
Real-World Exposure
github.com/modelcontextprotocol/registryReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The TrailingSlashMiddleware in internal/api/server.go is vulnerable to an open redirect attack. An attacker can craft a URL with a protocol-relative path (e.g., //evil.com/) that, after trailing slash removal, results in a Location header of //evil.com — which browsers interpret as an absolute URL to an external domain.
Details
The TrailingSlashMiddleware strips trailing slashes from request paths and issues a 308 Permanent Redirect to the cleaned path. However, it does not validate or sanitize the resulting path before using it as the redirect target.
When a request is made with a path like //evil.com/, the middleware processes it as follows:
PoC
- Start the registry server locally or identify a deployed instance
- Send a request with a double-slash path followed by an external domain:
curl -v https://<registry-host>//evil.com/<img width="3066" height="969" alt="image" src="https://github.com/user-attachments/assets/a5305f00-29bf-4708-952a-478d608f2074" /> - Observe the 308 Permanent Redirect response with Location: //evil.com:
- When accessed in a browser, the user is redirected to https://evil.com
Impact
Phishing: Attackers can abuse the trusted registry domain to redirect users to credential-harvesting pages Malware distribution: Redirect users to sites serving malicious downloads Trust abuse: Links originating from the official MCP Registry domain carry implicit trust
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/modelcontextprotocol/registry | ≥ 1.1.0&&< 1.7.5 | 1.7.5 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/modelcontextprotocol/registry. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/modelcontextprotocol/registry to 1.7.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-v8vw-gw5j-w7m6 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-v8vw-gw5j-w7m6 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-v8vw-gw5j-w7m6. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-v8vw-gw5j-w7m6 in your dependencies?
O3 detects GHSA-v8vw-gw5j-w7m6 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.