← Back to CVE Explorer

CVE-2026-48774

Full vulnerability record from the local CVENow database.

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.

Severity
HIGH
CVSS score
7.5 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-06-19 20:16:18.087000
Last modified
2026-10-25 23:10:00.167000
View original CVE JSON
{
  "id": "CVE-2026-48774",
  "sourceIdentifier": "[email protected]",
  "published": "2026-06-19T20:16:18.087",
  "lastModified": "2026-10-25T23:10:00.167",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "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."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "sysown",
          "product": "proxysql",
          "versions": [
            {
              "version": ">= 3.0.6, < 3.0.9",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
          "baseScore": 7.5,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 3.9,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-23T02:22:42.341874Z",
          "id": "CVE-2026-48774",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "yes"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-20"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:proxysql:proxysql:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "4.0.6",
              "versionEndExcluding": "4.0.9",
              "matchCriteriaId": "9277D3D6-2B42-4AB7-AFB4-66D111F1404D"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/sysown/proxysql/commit/e32b7fd50c7c234ea628e392e621e09a2a919e08",
      "source": "[email protected]",
      "tags": [
        "Patch"
      ]
    },
    {
      "url": "https://github.com/sysown/proxysql/security/advisories/GHSA-7wh6-2vcc-gcm4",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/sysown/proxysql/security/advisories/GHSA-7wh6-2vcc-gcm4",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}