Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-17346— pgAdmin 4: SQL injection via unescaped object names in index Statistics and publication/subscription dependency views (incomplete fix for CVE-2026-12044)

CVSS 8.8 · High EPSS 0.43% · P36

Affected Version Matrix 2

VendorProductVersion RangeStatus
pgadmin.orgpgAdmin 41.0< 9.17affected
5.0< 9.17affected
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2026-17346

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
pgAdmin 4: SQL injection via unescaped object names in index Statistics and publication/subscription dependency views (incomplete fix for CVE-2026-12044)
Source: CVE Program / CVE List V5
Vulnerability Description
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 against. The corresponding ALLOWLIST entries in test_sql_string_literal_lint.py are removed now that these sinks are properly escaped rather than merely assumed safe. A behavioral regression test renders each fixed template with a stacked-statement apostrophe payload and asserts both that the object name appears exactly as qtLiteral-escaped and that the rendered SQL parses as exactly one statement, verifying the assertion genuinely fails against the pre-patch raw-interpolation form. This issue affects pgAdmin 4: the Index Statistics sink from 1.0, and the Publications/Subscriptions sinks from 5.0, both before 9.17.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
SQL命令中使用的特殊元素转义处理不恰当(SQL注入)
Source: CVE Program / CVE List V5

Affected Products

VendorProductAffected VersionsCPESubscribe
pgadmin.orgpgAdmin 4 1.0 ~ 9.17 -
pgadmin.orgpgAdmin 4 5.0 ~ 9.17 -

II. Public POCs for CVE-2026-17346

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium
Qwen3.6-35B-A3B · 8764 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-17346

登录查看更多情报信息。

Patches & Fixes for CVE-2026-17346 (2)

Vendor Advisories for CVE-2026-17346 (1)

Same Patch Batch · pgadmin.org · 2026-07-31 · 7 CVEs total

CVE-2026-175669.9 CRITICALpgAdmin 4: RCE via backslash-escape mismatch in Import/Export Data query guard (incomplete
CVE-2026-173499.6 CRITICALpgAdmin 4: Adhoc server clone leaks another user's stored database credentials and ownersh
CVE-2026-173519.0 CRITICALpgAdmin 4: AI Assistant read-only transaction bypass via sqlparse/PostgreSQL lexer disagre
CVE-2026-173477.5 HIGHpgAdmin 4: OS command injection in MASTER_PASSWORD_HOOK via untrusted username substitutio
CVE-2026-173486.5 MEDIUMpgAdmin 4: Missing authentication decorator on Constraints, preferences, Debugger and Sche
CVE-2026-173505.4 MEDIUMpgAdmin 4: Tool permission bypass via backend routes and Socket.IO handlers

IV. Related Vulnerabilities

V. Comments for CVE-2026-17346

No comments yet


Leave a comment