Critical (AgentArmorHQ estimate)Supply chain

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

  1. Upgrade to the fixed version: run pip install --upgrade "mysql-mcp-server>=0.4.2" (first patched version 0.4.2). [1]
  2. 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.

Discuss this incident

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

  • An attacker on the network could run any SQL query without credentials. [1]
  • They could take out and change all data in the configured database. [1]
  • If the MySQL account has FILE privilege, they could read and write files, which can lead to running their own code. [1]

What was done

  • The maintainers released version 0.4.2. [1]
  • In 0.4.2, DNS-rebinding protection is turned on by passing TransportSecuritySettings(enable_dns_rebinding_protection=True) to SseServerTransport. [1]
  • The documented recommended bind address is 127.0.0.1. [1]

Sources

  1. 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.

Brief
[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-server
Was this page useful?

Corrections

Report an error or request a correction. We review requests within 5 business days and add a dated correction note.

10 to 2,000 characters. A link to a source helps. Stored as plain text.

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.

Check before you install

Paste a package name or a GitHub link and get a clear answer in seconds: Block, Review or No known issues. No account needed.

Check a package

Questions? Contact us