CVE-2026-12045: pgAdmin 4 AI Assistant read-only transaction bypass via prompt injection
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2026-12045
- Published
- Record updated
- Fixed in
- The source references a patch, a mitigation or a vendor advisory.
Summary
CVE-2026-12045 is a read-only transaction bypass in the pgAdmin 4 AI Assistant's execute_sql_query tool, affecting pgAdmin 4 from 9.13 before 9.16. An attacker who can write content the assistant reads can use prompt injection to make the LLM emit a multi-statement payload starting with COMMIT, END, ROLLBACK, or ABORT, which ends the read-only transaction and runs later statements in autocommit mode. Where the pgAdmin user's role is a superuser or holds pg_execute_server_program, the chain can extend to remote code execution on the database server host via COPY ... TO PROGRAM.
Mitigation
Fixed in pgAdmin 4 9.16. The fix validates that the LLM-supplied query parses to exactly one statement whose leading token is SELECT, WITH, EXPLAIN, SHOW, VALUES, or TABLE, and rejects transaction-control, DML, DDL, CALL, COPY, DO, SET/RESET, and other statements before any database work. PostgreSQL's READ ONLY mode continues to backstop data-modifying CTEs, EXPLAIN ANALYZE on writes, and volatile side effects.
Related items
- MediumCVE-2026-143967: Wise Chat with AI unauthenticated stored cross-site scriptingSimilar attack, NVD/CVE Database
- MediumCVE-2026-135917: Apache Camel A2A component confused deputy via shared message headersSimilar attack, NVD/CVE Database
- MediumCVE-2026-107489: Improper Authentication vulnerability in Apache Camel A2A component. This issue affects Apache Camel: from 4.21.0…Similar attack, NVD/CVE Database
- MediumNSA urges immediate post-quantum shift after AI labs report cryptography breakthroughsSimilar attack, CSO Online
- LowPerplexity caught an AI attacker casing its cloudSimilar attack, CSO Online