CVE-2026-59971criticalBroken access control2026-09-15
CVE-2026-59971: MySQL MCP Server in SSE mode runs anyone's SQL, including via DNS rebinding
Before 0.4.2, mysql-mcp-server with MCP_TRANSPORT=sse binds to 0.0.0.0 with no authentication and no DNS rebinding protection. A network attacker, or a malicious web page through the victim's browser, can call execute_sql against the database.
What it is
Setting MCP_TRANSPORT=sse makes src/mysql_mcp_server/server.py build SseServerTransport without security_settings or enable_dns_rebinding_protection. The Starlette routes /, /sse and /messages/ have no authentication, and the service binds to 0.0.0.0 by default.
A network attacker can reach the execute_sql tool directly, or use DNS rebinding so a victim's browser relays requests to a locally bound server, and run queries with the configured MySQL user's rights.
How to check
- Affected: mysql-mcp-server (PyPI) before 0.4.2 when run with MCP_TRANSPORT=sse.
- The default stdio transport isn't affected by this issue.
How to fix
- Upgrade mysql-mcp-server to 0.4.2 or later.
- Give the MCP server a MySQL user with the least privileges it needs, and don't expose the SSE port to other networks.
pip show mysql-mcp-server | grep -i version Sources
More advisories for this tool
- criticalMalicious npm and PyPI packages posing as AI and MCP tools: depfix-ai, agent-trace-kit, @go-gost/mcp-darwin-x64 and my-mcp-server-driving-license-ocr
- criticalMalicious npm packages posing as MCP servers: @rfewqa-fes/mnm-doc-mcp, @lemili9804/mcp-weather-server and mcp-contract-tester
- criticalMalicious code in @bestcoolman/dev-mcp (npm)
- criticalMalicious code in @massnerder/x402-scraper-mcp (npm)