top of page
perceptive_background_267k.jpg

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 exac…

Published:

30 July 2026 at 22:00:00

Alert date:

31 July 2026 at 17:02:18

Source:

nvd.nist.gov

Click to open the original link from this advisory

Enterprise Applications, Database & Storage, Web Technologies, Emerging Technologies

CVE-2026-17351 is a bypass of the fix introduced in CVE-2026-12045 for pgAdmin 4 versions 9.13 through 9.16. The vulnerability stems from a disagreement between sqlparse's string-literal lexing and PostgreSQL's own parser under standard_conforming_strings=on. An attacker can craft a payload that sqlparse classifies as a single SELECT statement, while PostgreSQL actually executes it as multiple statements, smuggling a COMMIT to escape the READ ONLY transaction wrapper and enabling write operations or RCE. An initial candidate fix using psycopg's execute(..., prepare=True) was found ineffective because psycopg3 silently falls back to the simple query protocol when prepare_threshold is None, which is pgAdmin's default. The corrected fix sets conn.prepare_threshold=0 on the dedicated read-only connection, forcing the extended query protocol and causing PostgreSQL to reject multi-statement inputs. The attack vector is indirect prompt injection: an attacker plants the malicious payload in any database object the AI Assistant may read, causing the LLM to emit it as a tool call. Affected versions are pgAdmin 4 from 9.13 before 9.17.

Technical details

Mitigation steps:

Affected products:

pgAdmin 4

Related links:

Related CVE's:

Related threat actors:

IOC's:

This article was created with the assistance of AI technology by Perceptive.

© 2025 by Perceptive Security. All rights reserved.

email: info@perceptivesecurity.com

Disclaimer: Deze website toont informatie afkomstig van externe bronnen. Perceptive aanvaardt geen verantwoordelijkheid voor de inhoud, juistheid of volledigheid van deze informatie.

bottom of page