CVE-2026-126197
pgEdge Postgres MCP Server enables SQL queries against PostgreSQL …
pgEdge Postgres MCP Server enables SQL queries against PostgreSQL databases through Model Context Protocol compatible clients. Prior to 1.1.0, custom pl-do tools interpolated JSON arguments into a PostgreSQL DO block delimited by fixed dollar-quote tags. An argument containing $mcp_custom_tool$ could terminate the block and inject arbitrary SQL statements, while $mcp_args$ could inject procedural code into a plpgsql block. Because the statement used the simple query protocol, injected text could include additional statements and transaction control, bypassing read_only and accessing data or modifying resources available to the connecting role. The issue requires at least one pl-do custom tool; sql and pl-func tools pass arguments as bind parameters and are not affected by this injection mechanism. This issue is fixed in 1.1.0.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/pgEdge/pgedge-postgres-mcp/commit/b5b929305de7a22cd6ed7de8ae1be2ac90ca0868
- github.com/pgEdge/pgedge-postgres-mcp/pull/196
- github.com/pgEdge/pgedge-postgres-mcp/releases/tag/v1.1.0
- github.com/pgEdge/pgedge-postgres-mcp/security/advisories/GHSA-r5pp-jx86-r6r9
- nvd.nist.gov/vuln/detail/CVE-2026-126197
- cve.org/CVERecord?id=CVE-2026-126197
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.