CVE & CISA-KEV Catalog

CVE-2026-17351

CRITICAL
9.0
CVSS v3
NVD

Description

The fix for CVE-2026-12045 in pgAdmin 4 9.16 required the LLM-supplied query passed to the AI Assistant's execute_sql_query tool to parse, via sqlparse, as exactly one non-transaction-control statement before running it inside a BEGIN TRANSACTION READ ONLY wrapper. sqlparse's string-literal lexing can disagree with PostgreSQL's own parser: under standard_conforming_strings = on (PostgreSQL's default since 9.1), a backslash immediately before a quote is an ordinary character to PostgreSQL, but sqlparse treats it as escaping the quote. A payload such as SELECT '\';COMMIT;CREATE TABLE pwn(x int);SELECT 1 --' therefore parses as a single SELECT to sqlparse's validator, while PostgreSQL executes it as four statements: the smuggled COMMIT ends the wrapping read-only transaction, and the trailing ROLLBACK becomes a no-op. This reintroduces the same write/RCE bypass CVE-2026-12045 was meant to close, reachable via the same indirect prompt-injection delivery (an attacker plants the payload in any object the AI Assistant may read; the LLM emits it as a tool call). An initial candidate fix ran the query with psycopg's execute(..., prepare=True), intending to force PostgreSQL's own Parse step (extended query protocol) to reject multi-statement text regardless of sqlparse's classification. This candidate fix does not work as submitted: psycopg3's PrepareManager silently ignores the prepare argument whenever the connection's prepare_threshold is None, which is pgAdmin's default for every server connection (the per-server "Prepare threshold" field is blank unless an administrator explicitly sets it) -- psycopg3 falls back to the simple query protocol, the same multi-statement-capable path the bypass exploits, so the candidate fix closes nothing on any real-world default configuration. The corrected fix sets conn.prepare_threshold = 0 directly on the dedicated, single-use read-only connection the AI Assistant tool opens, structurally forcing the extended query protocol independent of any server-level configuration. Verified against a live PostgreSQL 18 instance: the payload executes successfully under the prepare_threshold=None (default) behavior, and is rejected with "cannot insert multiple commands into a prepared statement" once prepare_threshold=0 is set on that connection. This issue affects pgAdmin 4: from 9.13 before 9.17.

How to fix

Remediation Available
pgadmin 4NVD
Affected:>= 9.13, < 9.17Fixed in:9.17CVE-2026-17351derived from NVD

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredLow
User InteractionRequired
ScopeChanged

Impact

ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Exploit Intelligence

0.38%probability of exploitation in 30 days
31stpercentile

Low risk: more likely to be exploited than 31% of all known CVEs.

References

Related Vulnerabilities

Other CWE-89 (SQL Injection) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2014-3704High7.5100%-Fix
CVE-2015-7297High7.5100%--
CVE-2024-29824High8.8100%KEVFix
CVE-2023-34362Critical9.8100%KEV + RansomFix
CVE-2019-7481High7.5100%KEV + RansomFix
CVE-2024-29826High8.8100%-Fix

Common questions

How do I fix CVE-2026-17351?

Upgrade pgadmin 4 to 9.17 or later.

Is CVE-2026-17351 being actively exploited?

Not that we know of. CVE-2026-17351 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 0.38% is the estimated probability that it will be exploited in the next 30 days. That is higher than 31% of all scored CVEs.

How severe is CVE-2026-17351?

CVE-2026-17351 has a CVSS v3 base score of 9.0, rated critical. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2026-17351 affect?

Published advisories record a fix for pgadmin 4 (NVD). Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2026-17351
CVE-2026-17351 severity badge

Markdown

[![CVE-2026-17351](https://tridentstack.com/cve/badge/CVE-2026-17351.svg)](https://tridentstack.com/cve/CVE-2026-17351)

HTML

<a href="https://tridentstack.com/cve/CVE-2026-17351"><img src="https://tridentstack.com/cve/badge/CVE-2026-17351.svg" alt="CVE-2026-17351"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

See how it worksStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-08-05.