Skip to main content

mysql-mcp-server CVE-2026-59971

| EUVDEUVD-2026-78580 CRITICAL
Missing Authentication for Critical Function (CWE-306)
2026-09-11 https://github.com/designcomputer/mysql_mcp_server GHSA-rqfv-2mw9-78g2
10.0
CVSS 3.1 · Vendor: https://github.com/designcomputer/mysql_mcp_server
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Locate exposed SSE instance (0.0.0.0 bind)
  2. Delivery
    Connect unauthenticated to /sse and /messages/
  3. Exploit
    Invoke execute_sql with crafted query
  4. Execution
    Dump/modify database
  5. Persist
    Abuse MySQL FILE priv INTO OUTFILE
  6. Impact
    Drop webshell for RCE

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication required for critical functions
MITRE ATT&CK

1 technique across 1 tactic: Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The server must be started with MCP_TRANSPORT=sse (the SSE/HTTP transport); the default stdio mode is not vulnerable. In that mode no further conditions apply for direct exposure - the service binds to 0.0.0.0 with no authentication and no Origin/Host validation on the /, /sse, and /messages/ routes, so any network-reachable attacker can call execute_sql. Limiting factors: SSE is not the default transport and must be explicitly enabled; escalation from SQL execution to host file read/write and RCE additionally requires the configured MySQL account to hold the FILE privilege; the DNS-rebinding variant (against a 127.0.0.1 bind) requires victim browser interaction with an attacker-controlled page.

Impact

The input CVSS is 10.0 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H), which correctly reflects unauthenticated network reach and full CIA impact in the vulnerable configuration; however, this base score does not capture the key limiter that the flaw only exists when the operator explicitly sets MCP_TRANSPORT=sse - the default stdio mode is not affected. I would assess Scope as Unchanged (the server is designed to reach its configured database), yielding roughly 9.8 rather than 10.0. No EPSS score, KEV entry, or SSVC decision data was provided; there is no public exploit identified at time of analysis, though the advisory documents concrete direct-exposure and DNS-rebinding attack paths and confirms 25 internet-exposed instances, indicating real but bounded exposure. Net: genuinely high severity where SSE is enabled and exposed, but the non-default transport requirement and small deployment footprint make it a targeted-scanning risk rather than a mass-exploitation event.

Exploit ScenarioDerived

An attacker scans the internet for exposed SSE instances (25 already identified), connects to a reachable 0.0.0.0-bound server, and invokes execute_sql with no credentials to dump the full database; if the MySQL user has FILE privilege, they use INTO OUTFILE to drop a webshell and gain RCE on the host. Alternatively, for a loopback-bound instance, they lure the victim's browser to a malicious page and use DNS rebinding to reach 127.0.0.1 as same-origin and issue the same queries. No public exploit tool is published, but the advisory details both paths.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 11, 2026

Unauthenticated arbitrary SQL execution in the mysql-mcp-server (designcomputer) MCP server occurs when it runs in SSE/HTTP transport mode (MCP_TRANSPORT=sse), where SseServerTransport is created without security_settings, disabling the MCP Python SDK's DNS-rebinding (Origin/Host) validation, omitting CORS/TrustedHost middleware, and binding to 0.0.0.0 with no authentication on any route. Any network-reachable attacker can invoke the execute_sql tool to dump or modify the entire database, and where the MySQL account holds FILE privilege, achieve arbitrary file read/write and potential RCE via webshell drop. The vendor reports 25 publicly reachable SSE instances found via internet-wide scanning; no CISA KEV listing and no standalone published exploit, so this is best characterized as no public exploit identified at time of analysis despite detailed attack scenarios in the advisory.

RemediationAI

Vendor-released patch: upgrade to mysql-mcp-server v0.4.2 (github.com/designcomputer/mysql_mcp_server/releases/tag/v0.4.2), which passes TransportSecuritySettings(enable_dns_rebinding_protection=True) to enable Host/Origin allowlist validation. Operators should also set MCP_SSE_HOST=127.0.0.1 to avoid the 0.0.0.0 bind and configure MCP_SSE_ALLOWED_HOSTS (comma-separated) when fronting the service with a reverse proxy. If patching is not immediately possible, revert to the default stdio transport (unset MCP_TRANSPORT=sse), which eliminates the exposure; alternatively bind the service to loopback and restrict network access to the SSE/messages routes via firewall or an authenticating nginx reverse proxy - noting these controls break any legitimate remote SSE clients. As defense in depth, grant the MySQL account only least-privilege access and strip the FILE privilege to remove the file-read/write and RCE escalation path (trade-off: disables any legitimate use of LOAD_FILE/INTO OUTFILE).

Affected VersionsENISA

mysql_mcp_server < 0.4.2

Affected Packages

pypi mysql-mcp-server fix: 0.4.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is a Model Context Protocol (MCP) server (pip package mysql-mcp-server) that exposes a MySQL database to LLM agents via a tool called execute_sql, whose sink is cursor.execute(query) with a fully attacker-controlled query. In SSE mode it runs as a Starlette ASGI application using the MCP Python SDK's SseServerTransport. The root cause (CWE-306, Missing Authentication for a Critical Function) is that the transport is instantiated without TransportSecuritySettings, so the SDK defaults enable_dns_rebinding_protection to False; combined with the absence of CORS/TrustedHost middleware, a default 0.0.0.0 bind, and no per-route auth on /, /sse, and /messages/, every request reaching the service is trusted. MySQL's FILE privilege (LOAD_FILE / INTO OUTFILE) is the escalation primitive that turns SQL execution into host file read/write and code execution.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/designcomputer/mysql_mcp_server) PRIMARY 10.0 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 9.8 CRITICAL

Unauthenticated network reach with no user interaction in SSE mode; Scope Unchanged since the server is designed to access its configured DB; full CIA impact via arbitrary SQL and FILE-priv RCE.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/designcomputer/mysql_mcp_server).

CVSS VectorVendor: https://github.com/designcomputer/mysql_mcp_server

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

In SSE/HTTP transport mode, mysql_mcp_server constructs SseServerTransport without passing security_settings. As a result, the MCP Python SDK's DNS-rebinding protection (Origin/Host header validation) is disabled; the Starlette application has no CORS or TrustedHost middleware; and the service binds to 0.0.0.0 by default with no authentication on any route.

Trigger condition: MCP_TRANSPORT=sse. The default stdio mode is not affected.

Attack Scenarios

Scenario A - Direct exposure: Any network attacker can invoke execute_sql to run arbitrary SQL without credentials → full data dump, and via MySQL FILE privileges, arbitrary file read/write and RCE.

Scenario B - DNS rebinding (local bind): An attacker lures a victim's browser to a malicious page, rebinds their domain to 127.0.0.1, and uses the browser as a proxy to invoke execute_sql as same-origin.

Root Cause

In src/mysql_mcp_server/server.py:

  1. SseServerTransport is constructed without security_settings - the SDK defaults enable_dns_rebinding_protection to False.
  2. The Starlette app has no CORS or TrustedHost middleware.
  3. All three routes (/, /sse, /messages/) are unauthenticated.
  4. The service binds to 0.0.0.0 by default.
  5. The sink is cursor.execute(query) with a fully attacker-controlled query.

Impact

  • Unauthenticated arbitrary SQL execution against the configured database
  • Full data exfiltration and modification
  • If the MySQL account holds FILE privilege: arbitrary file read (LOAD_FILE) and write (INTO OUTFILE) - potential RCE via webshell drop
  • Internet-wide scanning has identified 25 publicly reachable SSE instances of this project

Fix

Released in v0.4.2: DNS-rebinding protection is now enabled by passing TransportSecuritySettings(enable_dns_rebinding_protection=True) to SseServerTransport, and the documented recommended bind address is 127.0.0.1.

Credits

Discovered by Huanchen, SongWu (JHU), and BrookeYangRui (JHU).

Technical POC Analysis

No patch diff is included in the supplied evidence; the defect is reconstructed from the advisory's root-cause and fix statements.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

mysql-mcp-server instances running in SSE mode create an unauthenticated gateway to complete database access and potential server compromise for any external attacker. Vendor discovery identified 25 live instances already reachable from the internet, creating ongoing risks of database breach and remote code execution for affected organizations. Immediate network isolation or service shutdown is necessary.

Business Impact: Severe
Compensating Controls

Disable MCP_TRANSPORT=sse entirely and revert to the default transport mode (eliminates the vulnerability); restrict network access to mysql-mcp-server via firewall rules allowing only trusted internal IP ranges; revoke FILE privilege from the MySQL user account to prevent remote code execution via file write attacks; implement network-layer encryption and authentication if any instances must remain network-accessible; monitor vendor channels for patched releases.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Prevalence
Low
niche open-source MCP server, only 25 exposed SSE instances observed
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy