CVE-2026-48774: CWE-20: Improper Input Validation in sysown proxysql
ProxySQL is a proxy for MySQL and its forks, as well as PostgreSQL. In versions 3.0.0 through 3.0.8, ProxySQL's GenAI/MCP `run_sql_readonly` tool violates its documented read-only contract for MySQL targets. The tool validates only the full input string with a substring blacklist and first-keyword allowlist, but then executes the entire SQL string on a backend connection created with `CLIENT_MULTI_STATEMENTS`. As a result, a caller can submit a read-only first statement followed by a side-effecting second statement, such as `SELECT 1; RENAME TABLE ...`. The validator accepts the payload because it starts with `SELECT` and because side-effecting MySQL statements such as `RENAME TABLE`, `SET`, `RESET`, `LOCK TABLES`, and `KILL` are not rejected by the blacklist. In a live MCP runtime test, the `/mcp/query` endpoint accepted a `run_sql_readonly` request. The MCP response reported success for the first `SELECT`, and direct backend verification showed that the table had actually been renamed. This violates the endpoint's read-only security contract and lets an MCP caller perform backend writes or administrative SQL, limited by the configured MCP target account's database privileges. Version 3.0.9 contains a fix. Other operator mitigations include: keeping MCP disabled unless required; setting a non-empty `mcp-query_endpoint_auth` token before exposing `/mcp/query`; restricting MCP listener network exposure; configuring MCP backend target credentials as database-level read-only users; and adding temporary MCP query rules to block obvious multi-statement patterns.
AI Analysis
Technical Summary
ProxySQL's GenAI/MCP run_sql_readonly tool in versions 3.0.0 through 3.0.8 improperly validates SQL input by only checking the first keyword against an allowlist and applying a substring blacklist. However, it executes the entire SQL string on a backend connection with CLIENT_MULTI_STATEMENTS enabled. This allows an attacker to submit a read-only first statement followed by side-effecting statements such as RENAME TABLE, SET, RESET, LOCK TABLES, or KILL, which are not blocked by the blacklist. Consequently, the tool violates its read-only guarantee, enabling callers to perform backend writes or administrative SQL commands limited by the MCP target account's privileges. The vulnerability is addressed in version 3.0.9. Additional operator mitigations include disabling MCP when not required, enforcing authentication on the /mcp/query endpoint, restricting network access, using read-only backend credentials, and applying query rules to block multi-statement patterns.
Potential Impact
An unauthenticated remote attacker can bypass the intended read-only restriction of the run_sql_readonly tool and execute side-effecting SQL statements on the backend MySQL database. This can lead to unauthorized administrative actions such as renaming tables or altering database state, constrained only by the privileges of the MCP target account. The vulnerability does not impact confidentiality or availability directly but results in high integrity impact due to unauthorized data modification.
Mitigation Recommendations
A fix is available in ProxySQL version 3.0.9. Users should upgrade to this version to resolve the vulnerability. Until upgrading, operators should disable the MCP feature if it is not required, configure a non-empty mcp-query_endpoint_auth token to enforce authentication on the /mcp/query endpoint, restrict network exposure of the MCP listener, ensure MCP backend target credentials are limited to database-level read-only users, and implement temporary MCP query rules to block multi-statement SQL patterns that could exploit this issue.
CVE-2026-48774: CWE-20: Improper Input Validation in sysown proxysql
Description
ProxySQL is a proxy for MySQL and its forks, as well as PostgreSQL. In versions 3.0.0 through 3.0.8, ProxySQL's GenAI/MCP `run_sql_readonly` tool violates its documented read-only contract for MySQL targets. The tool validates only the full input string with a substring blacklist and first-keyword allowlist, but then executes the entire SQL string on a backend connection created with `CLIENT_MULTI_STATEMENTS`. As a result, a caller can submit a read-only first statement followed by a side-effecting second statement, such as `SELECT 1; RENAME TABLE ...`. The validator accepts the payload because it starts with `SELECT` and because side-effecting MySQL statements such as `RENAME TABLE`, `SET`, `RESET`, `LOCK TABLES`, and `KILL` are not rejected by the blacklist. In a live MCP runtime test, the `/mcp/query` endpoint accepted a `run_sql_readonly` request. The MCP response reported success for the first `SELECT`, and direct backend verification showed that the table had actually been renamed. This violates the endpoint's read-only security contract and lets an MCP caller perform backend writes or administrative SQL, limited by the configured MCP target account's database privileges. Version 3.0.9 contains a fix. Other operator mitigations include: keeping MCP disabled unless required; setting a non-empty `mcp-query_endpoint_auth` token before exposing `/mcp/query`; restricting MCP listener network exposure; configuring MCP backend target credentials as database-level read-only users; and adding temporary MCP query rules to block obvious multi-statement patterns.
CVSS v3.1
Score 7.5high
Affected software
pkg:github/sysown/proxysqlRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
ProxySQL's GenAI/MCP run_sql_readonly tool in versions 3.0.0 through 3.0.8 improperly validates SQL input by only checking the first keyword against an allowlist and applying a substring blacklist. However, it executes the entire SQL string on a backend connection with CLIENT_MULTI_STATEMENTS enabled. This allows an attacker to submit a read-only first statement followed by side-effecting statements such as RENAME TABLE, SET, RESET, LOCK TABLES, or KILL, which are not blocked by the blacklist. Consequently, the tool violates its read-only guarantee, enabling callers to perform backend writes or administrative SQL commands limited by the MCP target account's privileges. The vulnerability is addressed in version 3.0.9. Additional operator mitigations include disabling MCP when not required, enforcing authentication on the /mcp/query endpoint, restricting network access, using read-only backend credentials, and applying query rules to block multi-statement patterns.
Potential Impact
An unauthenticated remote attacker can bypass the intended read-only restriction of the run_sql_readonly tool and execute side-effecting SQL statements on the backend MySQL database. This can lead to unauthorized administrative actions such as renaming tables or altering database state, constrained only by the privileges of the MCP target account. The vulnerability does not impact confidentiality or availability directly but results in high integrity impact due to unauthorized data modification.
Mitigation Recommendations
A fix is available in ProxySQL version 3.0.9. Users should upgrade to this version to resolve the vulnerability. Until upgrading, operators should disable the MCP feature if it is not required, configure a non-empty mcp-query_endpoint_auth token to enforce authentication on the /mcp/query endpoint, restrict network exposure of the MCP listener, ensure MCP backend target credentials are limited to database-level read-only users, and implement temporary MCP query rules to block multi-statement SQL patterns that could exploit this issue.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-22T19:39:05.357Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a359d6df198dc38c122039f
Added to database: 06/19/2026, 19:50:05 UTC
Last enriched: 06/26/2026, 21:44:02 UTC
Last updated: 08/03/2026, 19:18:00 UTC
Views: 91
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.