SQL Injection Vulnerability in pgEdge Postgres MCP Server
CVE-2026-126199
What is CVE-2026-126199?
The pgEdge Postgres MCP Server allows direct SQL queries to be executed against PostgreSQL databases using Model Context Protocol compatible clients. A vulnerability was identified in versions prior to 1.1.0, where the system inadequately classified certain queries based on their initial keyword. This oversight led to potentially hazardous data manipulation operations, such as SELECT INTO, data-modifying common table expressions beginning with WITH, and EXPLAIN ANALYZE of a write, being interpreted as read operations. Consequently, these could execute without requiring write confirmations in an allow_writes connection, increasing the risk of unauthorized data modifications. Read-only connections are safeguarded by PostgreSQL’s transaction access mode, ensuring additional protection in certain scenarios. The issue was addressed in the 1.1.0 release.
Affected Version(s)
pgedge-postgres-mcp < 1.1.0
