SQL Injection in Pgadmin (CVE-2026-17346)
Summary
SQL injection in Pgadmin (CVE-2026-17346). Successful exploitation can lead to full system takeover.
Original description
The description as published by the source.
The fix for CVE-2026-12044 in pgAdmin 4 9.16 hardened qtLiteral and switched sixteen COMMENT ON / pgstattuple / pgstatindex templates to it, but missed several sinks that had been placed in test_sql_string_literal_lint.py's ALLOWLIST on the incorrect assumption that schema, table, publication, and subscription names sourced from pg_catalog via the browser tree could never contain an apostrophe. PostgreSQL permits arbitrary characters in quoted identifiers, so a low-privileged user able to CREATE TABLE, CREATE PUBLICATION, or CREATE SUBSCRIPTION can plant an apostrophe'd object name that breaks out of the unescaped '{{ name }}' template interpolation the moment any user (including a higher-privileged one) opens that object's Statistics or Dependencies tab, allowing arbitrary SQL statement injection in the viewing user's database session.
Affected sinks: the Index Statistics query for all-indexes listing (coll_stats.sql, both the 16_plus and default PostgreSQL-version template variants -- distinct from the single-index stats.sql path already fixed in CVE-2026-12044), and the publication and subscription dependencies.sql / get_position.sql templates (both the pg and ppas/EPAS dialect variants for publications).
Fix switches all of these templates to qtLiteral(conn) for name interpolation, and updates publications/init.py and subscriptions/init.py to pass conn=self.conn into the dependencies.sql render_template call so the qtLiteral filter has a connection to quote agai…
Source: NIST National Vulnerability Database NVD GitHub Advisory
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
pgAdmin 4バージョン9.16以前のいくつかのSQLテンプレートで脆弱性が発見されました。低権限のユーザーが不正なオブジェクト名を作成し、上位権限のユーザーがそれを開くとSQLインジェクションが可能になる問題です。これはクエリとテンプレートでのエスケープ処理の不備に起因しています。修正は不完全で、一部のテンプレートは未処理のままでした。最終的に、適切にエスケープ処理されるようテンプレートが更新されました。
pgAdmin 4のSQLテンプレートにおけるSQLインジェクション脆弱性。
pgAdmin 4のバージョン9.16以前。
高権限ユーザーのデータベースセッションで任意のSQL文が実行でき攻撃が可能。
テンプレートのエスケープ処理を強化し、すべてをqtLiteral(conn)を使用して修正。
情報なし
pgAdmin 4のバージョンを確認し、9.16以前の場合はアップデートを検討。
References
- patch github.com
- patch github.com
- patch github.com
- web nvd.nist.gov
- web github.com