CVE-2026-126197 · AI agents & MCP
NO FIX YET · SEE WHAT TO DO
The pgEdge Postgres MCP Server lets MCP clients run SQL against PostgreSQL. Before 1.1.0, custom pl-do tools placed JSON arguments into a DO block with fixed dollar-quote tags, so a crafted argument can break out and run extra SQL, including transaction control that bypasses read_only, with the privileges of the connecting database role.
first public Nov 11, 2026 · 1 source
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Only deployments running the pgEdge Postgres MCP Server before 1.1.0 with at least one custom pl-do tool are exposed. Servers that use only sql or pl-func tools, which pass arguments as bind parameters, are not affected by this injection path. Teams can skip it if they have no pl-do custom tools or already run 1.1.0 or later.
Not affected if no-pl-do-tools, sql-or-pl-func-tools-only, version-1.1.0-or-later
Who cares mcp, pgedge, postgresql
pl-do type; only those are affected.1.1.0 are affected.1.1.0.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.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.