Skip to main content

pgEdge Postgres MCP CVE-2026-126197

| EUVDEUVD-2026-124568 HIGH
SQL Injection (CWE-89)
2026-11-12 GitHub_M
8.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Invoke configured pl-do custom tool
  2. Delivery
    Supply argument containing $mcp_custom_tool$ tag
  3. Exploit
    Close DO block early, inject SQL
  4. Execution
    Append COMMIT; BEGIN READ WRITE statements
  5. Impact
    Read 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pgedge-postgres-mcp < 1.1.0

Affected Packages

euvd pgedge_postgres_mcp fix: 1.1.0

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

Vendor (GitHub_M) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Nov 12, 2026 - 18:18 EUVD
CVE Published
Nov 12, 2026 - 17:29 cve.org
HIGH 8.8

DescriptionCVE.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.

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Prevalence
Low
niche new MCP server bridging LLM clients to PostgreSQL; limited production footprint
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy