Simple PSQL MCP Server Read-Only Check Enables PostgreSQL Access-Control Bypass
Attack Tradecraft · 2 sources · Updated 3mo ago · First seen Sep 3, 2026

A design flaw in the Python-based Simple PSQL MCP Server lets users bypass its purported read-only mode because the control accepts any input beginning with SELECT. In PostgreSQL, SELECT statements can invoke functions and query system views, allowing an attacker using sufficiently privileged database credentials to expose database activity and configuration data, terminate or disrupt backend connections, or cause denial-of-service conditions.
The maintainer acknowledged the disclosure and noted that simple-psql-mcp is an educational starter template whose README warns of SQL-injection risk. Organizations deploying it should not treat keyword filtering as an authorization boundary: restrict the PostgreSQL role to least-privilege permissions and use an explicit allowlist of permitted queries or operations, rather than granting broadly privileged credentials to the MCP service.


