A critical SQL injection flaw tracked as CVE-2026-17351 affects pgAdmin 4 and allows an authenticated remote attacker to induce the product's AI Assistant to bypass intended read-only database protections. The bug is an incomplete fix for CVE-2026-12045 and arises from a parsing mismatch: pgAdmin validates LLM-generated SQL with sqlparse, while PostgreSQL interprets the same input differently, enabling a crafted payload to be seen as a single statement during validation but executed as multiple statements by the database. Public reporting says the issue affects pgAdmin 4 releases before 9.18, including versions 9.13 through 9.16, and a public proof of concept is reportedly available.
By smuggling a COMMIT into the SQL stream, an attacker can escape the read-only transaction wrapper and regain write capability, potentially leading to unauthorized SQL execution, data modification, privilege escalation, security control bypass, and in some environments a return of arbitrary code execution risk through the same indirect prompt-injection path as the earlier bug. Researchers reported that a proposed mitigation using psycopg3 prepared execution failed under default pgAdmin settings because prepare_threshold remained unset, causing fallback to PostgreSQL's simple query protocol; the corrected fix forces conn.prepare_threshold = 0 on the dedicated read-only connection so PostgreSQL rejects multi-statement input via the extended query protocol. Authorities recommend upgrading to the latest vendor patches immediately.

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.
5 events from the most recent confirmed update back to the earliest known activity.
Italy's ACN/CSIRT Italia reported multiple pgAdmin vulnerabilities, including three critical and two high-severity issues, and highlighted CVE-2026-17351 as a critical SQL injection flaw with a public proof of concept reportedly available. It recommended applying the latest vendor security patches.
A corrected mitigation for CVE-2026-17351 set conn.prepare_threshold = 0 on the AI Assistant's dedicated read-only connection so PostgreSQL would reject multi-statement input via the extended query protocol. This replaced an earlier attempted fix using execute(..., prepare=True) that failed under default pgAdmin settings.
CVE-2026-17351 was disclosed as a bypass of the earlier CVE-2026-12045 fix in pgAdmin 4, caused by a mismatch between sqlparse validation and PostgreSQL parsing that lets an attacker smuggle a COMMIT and re-enable write or possible RCE impact through the AI Assistant path. The issue affects pgAdmin 4 versions before 9.17 according to one reference, while another reports affected versions earlier than 9.18.
Testing against a live PostgreSQL 18 instance showed that a crafted payload could execute successfully under pgAdmin's default prepare_threshold=None behavior, escaping the intended read-only wrapper. When conn.prepare_threshold was set to 0, PostgreSQL rejected the multi-statement payload.
pgAdmin 4 version 9.16 introduced a fix for CVE-2026-12045 that required AI Assistant SQL to parse as exactly one non-transaction-control statement and executed it inside a read-only transaction wrapper. This fix was later found to be incomplete.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
4 references tracked. Mallory keeps watching after this page renders.
acn.gov.it
Open sourceacn.gov.it
Open sourcecvefeed.io
Open sourcecve.org
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.