SQL Read-Only Bypass Exposes MCP Database Servers to Data Modification
Vulnerability Disclosure · 3 sources · Updated 3mo ago · First seen Sep 3, 2026

Researchers identified SQL injection and improper-access-control weaknesses in Model Context Protocol (MCP) database servers that label interfaces as read-only by checking only whether submitted SQL begins with SELECT. In PostgreSQL, SELECT can call functions with side effects or administrative privileges; where multi-statement queries are allowed, attackers may also append additional commands. CVE-2025-59333 affects ExecuteAutomation's @executeautomation/database-server npm package and is rated CVSS 8.1.
An authenticated low-privilege user able to submit MCP queries could modify data through stored functions, retrieve data beyond intended scope under the service account's permissions, terminate database backends, or trigger expensive queries for denial of service. Organizations should not rely on SQL prefix filtering: enforce read-only database roles and transactions, restrict connections to allowlisted tables and functions, require single statements, use parameterized queries, and apply least-privilege permissions to MCP service accounts.


