Skip to content
Heist/ feed
Back to feed
Critical

MySQL MCP Server: Missing Origin/Host Validation in SSE Transport Enables Unauthenticated SQL Execution (DNS Rebinding / Direct Exposure)

Type: advisorySources: OSV

MySQL MCP Server is a Model Context Protocol server that enables secure interaction with MySQL databases. Prior to 0.4.2, setting MCP_TRANSPORT=sse causes src/mysql_mcp_server/server.py to construct SseServerTransport without security_settings or enable_dns_rebinding_protection, while the Starlette routes /, /sse, and /messages/ have no authentication and the service binds to 0.0.0.0 by default. A network attacker can directly reach execute_sql, or can use DNS rebinding to make a victim's browser relay same-origin requests to a locally bound service, and supply a query that reaches cursor.execute(query). This allows unauthenticated disclosure and modification of the configured database; when the MySQL account has FILE privileges, the same access can read or write server files and may enable code execution. The default stdio transport is not affected. This issue is fixed in 0.4.2.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-59971
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 08:36 UTC · Revision 1

Source evidence

MySQL MCP Server: Missing Origin/Host Validation in SSE Transport Enables Unauthenticated SQL Execution (DNS Rebinding / Direct Exposure)

core-osv · Original source

Published 15 Sept 2026, 14:10 UTC

MySQL MCP Server is a Model Context Protocol server that enables secure interaction with MySQL databases. Prior to 0.4.2, setting MCP_TRANSPORT=sse causes src/mysql_mcp_server/server.py to construct SseServerTransport without security_settings or enable_dns_rebinding_protection, while the Starlette routes /, /sse, and /messages/ have no authentication and the service binds to 0.0.0.0 by default. A network attacker can directly reach execute_sql, or can use DNS rebinding to make a victim's browser relay same-origin requests to a locally bound service, and supply a query that reaches cursor.execute(query). This allows unauthenticated disclosure and modification of the configured database; when the MySQL account has FILE privileges, the same access can read or write server files and may enable code execution. The default stdio transport is not affected. This issue is fixed in 0.4.2.

osv:CVE-2026-59971
Complete source record
{
  "id": "c713ecbd3b2f85f5073093b31c453db8e7a67f481f20cc7252dbfa1ed7389503",
  "url": "https://osv.dev/vulnerability/CVE-2026-59971",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "MySQL MCP Server: Missing Origin/Host Validation in SSE Transport Enables Unauthenticated SQL Execution (DNS Rebinding / Direct Exposure)",
    "summary": "MySQL MCP Server is a Model Context Protocol server that enables secure interaction with MySQL databases. Prior to 0.4.2, setting MCP_TRANSPORT=sse causes src/mysql_mcp_server/server.py to construct SseServerTransport without security_settings or enable_dns_rebinding_protection, while the Starlette routes /, /sse, and /messages/ have no authentication and the service binds to 0.0.0.0 by default. A network attacker can directly reach execute_sql, or can use DNS rebinding to make a victim's browser relay same-origin requests to a locally bound service, and supply a query that reaches cursor.execute(query). This allows unauthenticated disclosure and modification of the configured database; when the MySQL account has FILE privileges, the same access can read or write server files and may enable code execution. The default stdio transport is not affected. This issue is fixed in 0.4.2.",
    "evidence": "osv:CVE-2026-59971",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-59971",
      "aliases": [
        "CVE-2026-59971",
        "GHSA-rqfv-2mw9-78g2",
        "PYSEC-2026-4109"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/designcomputer/mysql_mcp_server",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "e25be7fc4e9e79d7efc52eb69d776129429a837f"
                },
                {
                  "fixed": "a96549f4a4d65443fd6e9c7f2324fba9a5c80a82"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.4.2"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "a96549f4a4d65443fd6e9c7f2324fba9a5c80a82"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e25be7fc4e9e79d7efc52eb69d776129429a837f"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.4.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.4.1",
            "v0.4.0",
            "v0.3.1",
            "v0.3.0",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-59971.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.265677693Z",
      "provider": "osv",
      "references": [
        "https://github.com/designcomputer/mysql_mcp_server/releases/tag/v0.4.2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59971.json",
        "https://github.com/designcomputer/mysql_mcp_server/security/advisories/GHSA-rqfv-2mw9-78g2",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-59971",
        "https://github.com/designcomputer/mysql_mcp_server/issues/92",
        "https://github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-306",
          "CWE-346"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59971.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-59971",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 493875,
  "published_at": "2026-09-15T14:10:28.116+00:00"
}