MySQL MCP Server: Missing Origin/Host Validation in SSE Transport Enables Unauthenticated SQL Execution
- Product
- mysql-mcp-server
- CVE
- CVE-2026-59971
- Affected
- mysql-mcp-server < 0.4.2
- Fixed in
- 0.4.2
Last verified against sources: October 26, 2026
Am I affected?
mysql-mcp-server: affected mysql-mcp-server < 0.4.2. Fixed in 0.4.2.
- Check your version: run
pip show mysql-mcp-server. Versions < 0.4.2 of mysql-mcp-server are affected. [1]
What to do now
- Upgrade to the fixed version: run
pip install --upgrade "mysql-mcp-server>=0.4.2"(first patched version 0.4.2). [1] - Bind the service to 127.0.0.1, the documented recommended bind address. [1]
General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.
What happened
- In SSE mode, the server built its SSE transport without the security settings, so the SDK's protection against DNS rebinding was off. [1]
- The app had no CORS or TrustedHost middleware, and all three routes (/, /sse, /messages/) had no login. [1]
- The service listened on 0.0.0.0 by default, which means every network interface. [1]
- This only happens when MCP_TRANSPORT=sse; the default stdio mode is not affected. [1]
Impact
What was done
Sources
- GHSA-rqfv-2mw9-78g2 — GitHub Advisory Database
Every statement above was checked against these sources before publishing. Spotted an error? Tell us and we will correct it with a dated note.
Share advisory brief with your team
Copy a plain-text summary for Slack, GitHub issues, or team security channels.
[CVE-2026-59971] MySQL MCP Server: Missing Origin/Host Validation in SSE Transport Enables Unauthenticated SQL Execution
Product: mysql-mcp-server | Affected: mysql-mcp-server < 0.4.2 | Fixed in: 0.4.2
Summary: In SSE mode, the server built its SSE transport without the security settings, so the SDK's protection against DNS rebinding was off.
Source & remediation on AgentArmorHQ: https://agentarmorhq.com/incidents/2026/09/cve-2026-59971-mysql-mcp-serverCorrections
Report an error or request a correction. We review requests within 5 business days and add a dated correction note.
Discussions for CVE-2026-59971
Ask questions or share configuration tips. Governed by our Community Rules & Terms.
No posts match this filter yet.
Be the first to ask a question or share a working tip.