Vulnerability  ·  2026-11-13

pgEdge Postgres MCP Server read-only mode bypass by SQL statement smuggling through query_database

VulnerabilityHigh impactGlobalCVE-2026-126196
Before 1.1.0, the query_database tool on a read_only connection could pass unrecognized statements through pgx Exec without bind parameters, which selects the simple query protocol (multiple statements) and bypasses the read-only enforcement that prevents data modification.
In an AI/RAG deployment the MCP server is the write path into the database for agent workflows. This bypass lets an agent (or an indirect prompt injection steering it) perform writes despite a read-only DB role being deliberately configured.
query_database on a read_only connection could send unrecognized statements through pgx Exec without bind parameters, selecting PostgreSQL's simple query protocol and bypassing the read-only enforcement.
pgedge-postgres-mcp < 1.1.0
Upgrade to pgedge-postgres-mcp 1.1.0. Use least-privilege DB roles; monitor for unexpected writes from the MCP connection.
GitHub commit b5b929305 (pgEdge)OpenAdvisories — CVE-2026-126196
See this in the live feed Explore related AI security and governance findings — updated every morning.
Open the feed →