github.com/modelcontextprotocol/registry
Affected
- introduced
1.1.0, fixed1.7.5(semver)
Fixed versions
1.7.5
Fix
- Fixed version
1.7.5go get github.com/modelcontextprotocol/[email protected]
Advisory
Also known as: CVE-2026-44427, GO-2026-5658
MCP Registry has open redirect via protocol-relative path in trailing-slash middleware
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
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" />
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
Medium Basis: The source's own band: MODERATE
1.1.0, fixed 1.7.5 (semver)1.7.5
1.7.5go get github.com/modelcontextprotocol/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0