CVE-2026-59971
Received Received - Intake

Unauthenticated SQL Injection in MySQL MCP Server

Vulnerability report for CVE-2026-59971, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-15

Last updated on: 2026-09-15

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-15
Last Modified
2026-09-15
Generated
2026-09-15
AI Q&A
2026-09-15
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
mysql mcp_server to 0.4.2 (inc)
designcomputer mysql_mcp_server to 0.4.2 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-346 The product does not properly verify that the source of data or communication is valid.
CWE-306 The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the MySQL MCP Server versions prior to 0.4.2 when using the SSE transport mode. The server binds to all network interfaces by default without authentication, allowing unauthenticated SQL execution. Attackers can exploit this directly or via DNS rebinding to run arbitrary SQL commands, potentially leading to full database compromise or remote code execution if MySQL FILE privileges are available.

Detection Guidance

Check if the MySQL MCP Server is running with MCP_TRANSPORT=sse by inspecting environment variables or process commands. Verify if the service is bound to 0.0.0.0 using netstat or ss commands like 'netstat -tulnp | grep mysql_mcp' or 'ss -tulnp | grep mysql_mcp'. Test for unauthenticated access by attempting to connect to /sse or /messages/ endpoints using curl commands like 'curl http://<server>:<port>/sse'.

Impact Analysis

An attacker could access your database without credentials, stealing or modifying data. If the MySQL account has FILE privileges, they could read or write server files, potentially leading to code execution. Even if bound to localhost, DNS rebinding could trick a user's browser into relaying requests to the service.

Compliance Impact

This vulnerability could lead to unauthorized access and data breaches, violating GDPR's data protection requirements and HIPAA's safeguards for protected health information. Full database compromise risks non-compliance with confidentiality and integrity mandates.

Mitigation Strategies

Upgrade to version 0.4.2 or later immediately. If upgrading is not possible, disable SSE transport by unsetting MCP_TRANSPORT or setting it to stdio. Bind the service to 127.0.0.1 instead of 0.0.0.0. Configure MCP_SSE_ALLOWED_HOSTS to restrict allowed origins. Place the server behind a reverse proxy with authentication like nginx using HTTP Basic Auth.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59971. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart