ruvocal: SSRF through user-supplied MCP server URLs
Description
Impact
A ruvocal chat session (anonymous when login is off) can supply its own MCP server URL and headers. isValidUrl in ruflo/src/ruvocal/src/lib/server/urlSafety.ts (around lines 37-60), used by textGeneration/mcp/runMcpFlow.ts and routes/api/mcp/health/+server.ts, behaves as follows:
- it explicitly allows
localhost,127.0.0.1,host.docker.internaland any dotlesshttp://name such asmongodbormetadata; - it checks only IP literals, so an https hostname that resolves to a private address also passes.
The MCP client connects with plain fetch, so the IP pinning in ssrfSafeAgent is skipped, and results and errors come back to the caller. One target reachable this way is the mcp-bridge (see the companion advisory).
Fix
Allow loopback and dotless hosts only for operator-configured MCP_SERVERS, and route MCP transports through a dispatcher that pins the resolved IP.