Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInvoke configured pl-do custom tool
-
DeliverySupply argument containing $mcp_custom_tool$ tag
-
ExploitClose DO block early, inject SQL
-
ExecutionAppend COMMIT; BEGIN READ WRITE statements
-
ImpactRead or modify data as connecting role
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the deployment to define at least one custom tool of type pl-do, which only exists when an operator sets custom_definitions_path - the advisory states this custom-tools surface is invisible and off by default. The caller must be able to invoke that pl-do tool; per the CVSS PR:L this is authenticated/low-privilege access to the MCP interface, not anonymous. sql and pl-func tools are NOT a viable vector because they pass arguments as bind parameters. Limiting factors: no special conditions beyond a defined pl-do tool and the ability to call it; impact is bounded by the connecting database role's privileges (a role with no write grants limits modification but not reading), and the flaw is most consequential where query_database is disabled and custom tools are the only interface. Versions 1.1.0 and later are not affected (per-invocation random UUID delimiters plus argument tag validation). |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H, base 8.8) describes a network-reachable, low-complexity flaw requiring low privileges and no user interaction, with high confidentiality, integrity and availability impact - consistent with CWE-89 SQL injection that runs as the connecting database role. The vuln.today priority is 'this_week' (not act_now/emergency). No CISA KEV listing is present and no EPSS score was supplied, so exploitation probability cannot be quantified from the input; status is therefore 'no public exploit identified at time of analysis' (the four references are the GHSA advisory, fix PR #196, the fix commit, and the 1.1.0 release tag - all patch-side artifacts, none a PoC or working exploit). The practical priority is tempered by a real precondition the PR:L alone does not convey: exploitation is only possible where an operator has defined at least one custom pl-do tool (custom_definitions_path configured), which the advisory describes as an off-by-default, operator-enabled surface that 'had never been exercised through the MCP protocol' - so this is a genuine high-severity bug but gated to a non-default deployment, not a mass-exploitable internet-wide condition. Missing data to note explicitly: no EPSS, no KEV, no confirmed PoC, and no independent telemetry on how many deployments actually define pl-do tools. |
| Exploit ScenarioDerived | An actor able to invoke a configured custom pl-do tool passes a JSON argument whose value contains the literal dollar-quote tag $mcp_custom_tool$ (or $mcp_args$ for plpgsql), closing the DO block early so the remainder is parsed as SQL; because the statement runs over the simple query protocol with no bind parameters, the injected text can append further statements and transaction control (e.g. COMMIT; BEGIN READ WRITE) to escape read_only and read or modify anything the connecting role can reach. No public exploit code was identified in the input, though the mechanism is fully documented in the GHSA advisory and fix. CVSS AC:L/UI:N indicates the injection is reliable and needs no victim interaction once the caller can reach a pl-do tool. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 12, 2026
SQL injection in pgEdge Postgres MCP Server 1.0.0 and earlier lets an authenticated, low-privilege caller who can invoke a custom pl-do tool execute arbitrary SQL as the connecting database role, including statements that escape the server's read-only guard. The flaw arises because JSON-encoded tool arguments were interpolated into a DO block bounded by fixed dollar-quote tags ($mcp_custom_tool$, and $mcp_args$ for plpgsql), and because the statement ran over the PostgreSQL simple query protocol, so injected text could contain extra statements and transaction control. Only deployments that define at least one pl-do custom tool are exposed (sql and pl-func tools pass bind parameters and are not a vector); no public exploit code and no active exploitation are identified in the available sources, and a vendor patch is available in 1.1.0.
RemediationAI
Vendor-released patch: 1.1.0 - upgrade pgEdge Postgres MCP Server to 1.1.0 or later, which replaces the fixed $mcp_custom_tool$ and $mcp_args$ delimiters with per-invocation random UUID tags and rejects arguments carrying either tag (see https://github.com/pgEdge/pgedge-postgres-mcp/releases/tag/v1.1.0, commit b5b9293 and PR https://github.com/pgEdge/pgedge-postgres-mcp/pull/196). The advisory explicitly states that upgrading is not sufficient on its own: review database audit logs for unexpected statements issued through the MCP connection, particularly anything executed alongside a DO block, since the patch prevents further injection but does not reveal whether injection already occurred. If upgrading is not immediately possible, remove or disable custom pl-do tools, which eliminates the vector at the cost of losing that tool functionality; additionally, granting the connecting role no write privileges limits what an injected statement can modify but does not prevent it from reading anything that role can read, so the trade-off is reduced integrity impact without confidentiality protection. Note that restricting read-only mode or relying on the query_database guard does not mitigate this issue, since the injected statements never pass through that guard.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is the custom-tools framework of pgEdge Postgres MCP Server, a Model Context Protocol server that runs SQL against PostgreSQL on behalf of MCP clients. Custom tools are opt-in and only exist when an operator sets custom_definitions_path; of the three tool types, pl-do executes caller-supplied logic as a PostgreSQL DO block, pl-func creates and drops a temporary function, and sql runs plain statements. The root cause is CWE-89: tool arguments were serialised to JSON and interpolated directly into the DO block body, which was delimited with the hard-coded dollar-quote tag $mcp_custom_tool$ (with a nested $mcp_args$ tag for plpgsql tools). JSON encoding does not escape the dollar sign, so an argument value containing either tag terminated the quoting early and had the remainder parsed as SQL - for plpgsql, injected text landed inside the block body as procedural code. The statement was issued through pgx's Exec with no bind parameters, which falls back to the PostgreSQL simple query protocol, a channel that accepts multiple semicolon-separated statements per message; injected text could therefore carry additional statements and transaction control (for example SET TRANSACTION READ WRITE or COMMIT; BEGIN READ WRITE) that ended the read-only transaction and opened a writable one. This bypassed the read_only enforcement entirely and never reached the query_database statement guard. The fix in 1.1.0 generates the dollar-quote delimiters per invocation from a random UUID (for pl-func tools as well), refuses arguments or code containing either delimiter, and adds related hardening: read-only connections now use the extended query protocol so only one statement per message is accepted, the access mode is requested as part of BEGIN rather than a following SET TRANSACTION READ ONLY, and the guard rejects constructs that escape read-only mode such as DO blocks, COPY ... TO PROGRAM, server-side file functions, dblink and transaction control.
Know when Pgedge Postgres Mcp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Network-reachable MCP interface, reliable injection (AC:L), caller must be able to invoke a configured pl-do tool so PR:L; runs as connecting role giving full C/I/A within that role's reach.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
CWE-89, SQL injection via unneutralised dollar-quote delimiters in dynamically constructed DO blocks.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
pgEdge Postgres MCP Server 1.0.0 and earlier contains a high-severity SQL injection flaw that allows authenticated low-privilege users to execute arbitrary SQL as the database connection role, bypassing read-only protections. This impacts any organization using the product with custom pl-do tools, potentially leading to data breaches or unauthorized data modification. Leadership should prioritize remediation given the high CVSS score and potential for significant data compromise.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in Pgedge Postgres Mcp
View allRead-only mode in pgEdge Postgres MCP Server 1.0.0 and earlier can be bypassed through the query_database tool, allowing
Client-side write confirmation bypass in pgEdge Postgres MCP Server 1.0.0 and earlier: the bundled CLI and web clients d
Login rate limiting in pgEdge Postgres MCP Server 1.0.0 and earlier - including all alpha and beta pre-releases - can be
SQL injection in the where parameter of the count_rows tool in pgEdge Postgres MCP Server 1.0.0 and earlier (including a
DNS rebinding exposure in pgEdge Postgres MCP Server 1.0.0 and earlier lets a web page the user is merely visiting drive
pgEdge Postgres MCP Server 1.0.0 and earlier ship bundled CLI and web clients that decide whether to ask the user for co
EUVD-2026-124568
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB