mcp-sanitizer: URL sanitizer allows localhost/IPv6 loopback SSRF bypass via explicit port or bracketed IPv6
GHSA-4mfg-r38w-w8fg · published 2026-10-28
- Severity
- High
- CVSS score
- 8.2
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 1.4.0
This is a Server-Side Request Forgery (SSRF) vulnerability. Any application that: 1. Uses mcp-sanitizer's sanitize() / createMCPToolMiddleware() as the security boundary for outbound URLs, and 2. Passes the returned sanitized URL to an HTTP client (the library's documented intended use for webfetch/webscraper MCP tools), is exploitable by any party that can supply the url parameter — typically an unauthenticated network attacker in an MCP server deployment.
Upgrade mcp-sanitizer to 1.4.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| mcp-sanitizer | npm | < 1.4.0 | 1.4.0 |
- CriticalMLflow: Unauthenticated full-read SSRF in webhook delivery: _validate_webhook_url bypassed via unvalidated HTTP redirects (and DNS rebindingmlflowExploited
- Critical@zereight/mcp-gitlab Vulnerable to Server-Side Request Forgery@zereight/mcp-gitlab
- CriticalSSRF + LLM API key exfiltration via user-controlled basepath / baseUrl in 8 chat-model nodesflowise, flowise-components
- CriticalLocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLsgithub.com/mudler/LocalAI
- CriticalFastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerabilityfastmcp
- CriticalBentoML SSRF Vulnerability in File Upload Processingbentoml
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.