# 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)

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.7
- **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:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.61% (percentile 44, 2026-11-26)
- **CWE:** CWE-89
- **Published:** 2026-07-31T15:59:13.136Z
- **Modified:** 2026-10-23T23:10:00.157Z

## Who should check

- Anyone running pgadmin.org pgAdmin 4 \>= 1.0, \< 9.17
- Anyone running pgadmin.org pgAdmin 4 \>= 5.0, \< 9.17

## 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

- pgadmin.org pgAdmin 4: \>= 1.0, \< 9.17 (cvelist)
- pgadmin.org pgAdmin 4: \>= 5.0, \< 9.17 (cvelist)

## Mitigation

- Upgrade pgAdmin 4 to 9.17 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- patch: <https://github.com/pgadmin-org/pgadmin4/issues/10193>
- patch: <https://github.com/pgadmin-org/pgadmin4/commit/73b3218992cc37af6e10b7e54eaeed6ec293c6b2>
- patch: <https://github.com/pgadmin-org/pgadmin4/commit/f75452bfd0f786d0c071638919d48fc1d76f987d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-17346>

HTML: <https://flawdb.com/CVE-2026-17346> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-17346>
