Version 9.17 — pgAdmin 4 9.17 documentation
The pgAdmin 4 v9.17 release notes document an OS command injection vulnerability in the Import/Export Data tool. A query-based export can pass a crafted query string past the \copy(...) parenthesis-balance guard by exploiting a backslash-escape mismatch with psql's default standard_conforming_strings=on behaviour, exposing a live TO PROGRAM clause for arbitrary command execution. The vulnerability was reported by Arpit Jain and is fixed in version 9.17. The same release also addresses six other vulnerabilities: SQL injection in Index Statistics and Publications/Subscriptions views (CVE-2026-17346, incomplete fix for CVE-2026-12044), OS command injection in MASTER_PASSWORD_HOOK (CVE-2026-17347), unauthenticated route access via missing @pga_login_required decorator (CVE-2026-17348, incomplete fix for CVE-2026-12046), credential leakage via adhoc server connection cloning (CVE-2026-17349), tool-permission bypass (CVE-2026-17350), and AI Assistant read-only transaction guard bypass (CVE-2026-17351, incomplete fix for CVE-2026-12045).
Research notes
- Root causeThe OS command injection in the Import/Export Data tool occurs because a query-based export can pass a crafted query string past the \copy(...) parenthesis-balance guard by exploiting a backslash-escape mismatch with psql's default standard_conforming_strings=on behaviour, exposing a live TO PROGRAM clause for arbitrary command execution.
- Technical detailThe vulnerability involves a lexer/parser differential between the application's parenthesis-balance guard and psql's actual string interpretation under standard_conforming_strings=on, allowing a TO PROGRAM clause to be smuggled past the guard.
- MitigationFixed in pgAdmin 4 version 9.17. The release also addresses six other vulnerabilities including incomplete fixes for CVE-2026-12044, CVE-2026-12045, and CVE-2026-12046.