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)
Mitigation
- Upgrade pgAdmin 4 to 9.17 or later.
Who should check
- Anyone running pgadmin.org pgAdmin 4 >= 1.0, < 9.17
- Anyone running pgadmin.org pgAdmin 4 >= 5.0, < 9.17
Vulnerability facts
- Affected
- pgadmin.org pgAdmin 4 >= 1.0, < 9.17; pgadmin.org pgAdmin 4 >= 5.0, < 9.17
- Fixed in
- pgadmin.org pgAdmin 4 9.17, pgadmin.org pgAdmin 4 9.17
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 8.7 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: None
- Privileges required: Low
- User interaction: None
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.61% chance of exploitation in 30 days (percentile 44, 2026-11-26)
- CWE
- CWE-89
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| pgadmin.org pgAdmin 4 | >= 1.0, < 9.17 | — | cvelist |
| pgadmin.org pgAdmin 4 | >= 5.0, < 9.17 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-17346. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-17346.md Affected: pgadmin.org pgAdmin 4 >= 1.0, < 9.17; pgadmin.org pgAdmin 4 >= 5.0, < 9.17 Fixed in: pgadmin.org pgAdmin 4 9.17, pgadmin.org pgAdmin 4 9.17 Steps: 1. Search this machine and project for pgadmin.org pgAdmin 4: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2026-17346 being exploited?
There is no confirmed exploitation: CVE-2026-17346 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.61% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-17346?
High: CVSS 8.7 (v4.0, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2026-17346?
pgadmin.org pgAdmin 4 >= 1.0, < 9.17; pgadmin.org pgAdmin 4 >= 5.0, < 9.17.
Is there a fix for CVE-2026-17346?
Yes. Fixed in pgadmin.org pgAdmin 4 9.17, pgadmin.org pgAdmin 4 9.17. Upgrade pgAdmin 4 to 9.17 or later.
How do I check if I'm affected by CVE-2026-17346?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.