Evidence · DiggingBeagle record
pgEdge custom procedural MCP tools could execute caller-controlled SQL through delimiter collisions (original advisory or patch)
A Postgres MCP server placed arguments inside fixed dollar-quoted procedural SQL, so a crafted tool argument could become executable SQL under the connecting database role.
- Published
- Nov 11, 2026
- Source role
- primary disclosure
Evidence record
A Postgres MCP server placed arguments inside fixed dollar-quoted procedural SQL, so a crafted tool argument could become executable SQL under the connecting database role.
Claim-level citations (4)
- supportspgEdge custom procedural MCP tools could execute caller-controlled SQL through delimiter collisions: The pgEdge advisory describes the fix as replacing predictable dollar-quote boundaries with invocation-specific delimiter handling and safer quoting, while separately noting that custom sql and pl-func tools already used bound parameters. The patch addresses the custom pl-do interpolation path, not every possible unsafe procedural definition in PostgreSQL.
GHSA-r5pp-jx86-r6r9, vulnerable custom pl-do interpolation and patch description
- supportspgEdge custom procedural MCP tools could execute caller-controlled SQL through delimiter collisions: The maintainers describe arbitrary SQL execution under the connecting role as a possible result and specify version 1.1.0 as the fix; changing the role to a least-privilege database account independently limits the effect.
Impact, affected and patched versions
- supportspgEdge custom procedural MCP tools could execute caller-controlled SQL through delimiter collisions: An argument containing a fixed delimiter can terminate the generated SQL literal; the server previously sent the combined block through a protocol that permitted multiple statements.
Description of fixed dollar-quote tags and the custom pl-do path
- supportspgEdge custom procedural MCP tools could execute caller-controlled SQL through delimiter collisions: The maintainer identifies custom pl-do tools through pgEdge Postgres MCP Server 1.0.0 as vulnerable to dollar-quote delimiter collisions and records 1.1.0 as fixed; custom sql and pl-func tools use bound parameters and are outside this specific injection path.
GHSA-r5pp-jx86-r6r9, Description, Who is affected and Patches