{"id":"CVE-2026-48774","aliases":["CVE-2026-48774","BIT-PROXYSQL-2026-48774","GHSA-7wh6-2vcc-gcm4"],"related":[],"kind":"vulnerability","state":"published","title":"ProxySQL MCP run_sql_readonly executes side-effecting MySQL multi-statements despite read-only contract","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"ProxySQL es un proxy para MySQL y sus bifurcaciones, así como PostgreSQL. En las versiones 3.0.0 a 3.0.8, la herramienta “run_sql_readonly” de GenAI/MCP de ProxySQL viola su contrato de solo lectura documentado para objetivos de MySQL. La herramienta valida solo la cadena de entrada completa con una lista negra de subcadenas y una lista blanca de la primera palabra clave, pero luego ejecuta la cadena SQL completa en una conexión de backend creada con “CLIENT_MULTI_STATEMENTS”. Como resultado, un llamador puede enviar una primera declaración de solo lectura seguida de una segunda declaración con efectos secundarios, como “SELECT 1; RENAME TABLE ...”. El validador acepta la carga útil porque comienza con “SELECT” y porque las declaraciones de MySQL con efectos secundarios como “RENAME TABLE”, “SET”, “RESET”, “LOCK TABLES” y “KILL” no son rechazadas por la lista negra. En una prueba de tiempo de ejecución de MCP en vivo, el endpoint “/mcp/query” aceptó una solicitud “run_sql_readonly”. La respuesta de MCP informó éxito para el primer “SELECT”, y la verificación directa del backend mostró que la tabla había sido realmente renombrada. Esto viola el contrato de seguridad de solo lectura del endpoint y permite a un llamador de MCP realizar escrituras en el backend o SQL administrativo, limitado por los privilegios de base de datos de la cuenta objetivo de MCP configurada. La versión 3.0.9 contiene una corrección. Otras mitigaciones del operador incluyen: mantener MCP deshabilitado a menos que sea necesario; establecer un token “mcp-query_endpoint_auth” no vacío antes de exponer “/mcp/query”; restringir la exposición de red del oyente de MCP; configurar las credenciales del objetivo de backend de MCP como usuarios de solo lectura a nivel de base de datos; y añadir reglas de consulta de MCP temporales para bloquear patrones obvios de múltiples declaraciones.","source":"nvd"}],"published":"2026-06-19T19:34:39.971Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":">= 3.0.6, < 3.0.9","status":"affected"}],"vendor":"sysown","product":"proxysql","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.0.6","fixed":"4.0.9"}],"vendor":"proxysql","product":"proxysql","cpe":"cpe:2.3:a:proxysql:proxysql:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"3.0.6","status":"affected","fixed":"3.0.9"}],"ecosystem":"Bitnami","package":"proxysql","purl":"pkg:bitnami/proxysql","source":"bitnami"}],"references":[{"url":"https://github.com/sysown/proxysql/security/advisories/GHSA-7wh6-2vcc-gcm4","tags":["advisory","exploit","mitigation","vendor-advisory","x-refsource-confirm"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://github.com/sysown/proxysql/commit/e32b7fd50c7c234ea628e392e621e09a2a919e08","tags":["fix","patch","x-refsource-misc"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48774","tags":["web"],"sources":["bitnami"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-06-23T02:22:42.341Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-48774","url":"https://www.cve.org/CVERecord?id=CVE-2026-48774","licence":"CVE Terms of Use","modified":"2026-06-23T02:23:14.975Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-48774","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48774","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PROXYSQL-2026-48774","url":"https://osv.dev/vulnerability/BIT-PROXYSQL-2026-48774","licence":"Apache-2.0","modified":"2026-09-08T08:48:04.937Z"}],"updatedAt":"2026-11-25T22:59:25.286Z","epss":{"score":0.00392,"percentile":0.25046,"date":"2026-11-30T12:00:22.000Z"}}