T05 · Unauthorized Access and Privilege Escalation
- Location
src/index.ts:363- Finding
Unauthenticated MCP HTTP Server Binds to All Network Interfaces
- Content
View full analysis
{ if (req.url && !req.url.startsWith('/mcp') && req.url !== '/' && !req.url.startsWith('/?')) { res.statusCode = 404; res.end(); return; } try { let parsedBody: unknown; if (req.method === 'POST') { parsedBody = await readBody(req); } await transport.handleRequest(req as any, res, parsedBody); } catch (err) { console.error('Request error:', err); res.statusCode = 500; res.end(); } }); httpServer.listen(port, '0.0.0.0', () => { console.error(`Grizzly SMS MCP server listening on http://0.0.0.0:${port}/mcp`); }); } else { const transport = new StdioServerTransport(); await server.connect(transport); console.error('Grizzly SMS MCP server running (stdio)...'); } } ``` ### Technical Analysis When `MCP_TRANSPORT=http` is enabled, the MCP server listens on `0.0.0.0`, making it reachable through every available network interface. Requests are passed directly to `StreamableHTTPServerTransport` without any authentication, authorization, API token validation, or client identity check. The exposed MCP tools include operations that access or mutate the configured Grizzly account: - `get_balance` - `get_wallet` - `request_number` - `get_status` - `set_status` - `get_prices` - `get_countries` - `get_services` Several of these operations are sensitive or chargeable. In particular, `reque ...[truncated 1511 chars]- Remediation
View remediation
