GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — AI Assistant read-only transaction bypass via sqlparse/PostgreSQL lexer disagreement (CVE-2026-17351) · Issue #10192 · pgadmin-org/pgadmin4

AI Assistant read-only transaction bypass via sqlparse/PostgreSQL lexer disagreement (CVE-2026-17351) #10192

New issue
Copy link
New issue
Copy link
Closed
Closed
AI Assistant read-only transaction bypass via sqlparse/PostgreSQL lexer disagreement (CVE-2026-17351)#10192
Copy link
Milestone
9.17

Description

@asheshv
asheshv
opened on Jul 24, 2026
Issue body actions

Summary

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), a backslash before a quote is a literal character, not an escape, so a crafted multi-statement payload could be classified by sqlparse as a single statement while PostgreSQL executed it as several — smuggling a COMMIT past the read-only wrapper and executing arbitrary SQL. This is an incomplete fix for CVE-2026-12045.

The fix executes the query over psycopg3's extended query protocol (forcing prepare_threshold = 0 on the dedicated read-only connection), so PostgreSQL's own Parse step rejects multi-statement text regardless of how any client-side lexer classifies it.

Affected versions

pgAdmin 4 >= 9.13, < 9.17

Fix

Fixed in pgAdmin 4 9.17 by commit ef76102bc.

Severity

  • CVSS 3.1: 9.0 CRITICAL — CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
  • CVSS 4.0: 9.4 CRITICAL — CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Credit

Reported by Kai Aizen (SnailSploit).

References

  • CVE: CVE-2026-17351
  • Related: CVE-2026-12045
  • Release notes: pgAdmin 4 9.17

Activity

  1. asheshv
    changed the title [-]Internal tracking: pending fix for 9.17[/-] [+]AI Assistant read-only transaction bypass via sqlparse/PostgreSQL lexer disagreement (CVE-2026-17351)[/+] on Jul 31, 2026
  2. asheshv
    added this to the 9.17 milestone on Jul 31, 2026
  3. asheshv commented on Jul 31, 2026

    @asheshv
    asheshv
    on Jul 31, 2026
    ContributorAuthor
    More actions

    Fixed in pgAdmin 4 9.17, released 2026-07-30.

  4. asheshv
    closed this as completedon Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • 9.17

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.