Skip to main content

pgAdmin 4 CVE-2026-17346

| EUVDEUVD-2026-51559 HIGH
SQL Injection (CWE-89)
2026-07-31 f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 GHSA-vmj8-4452-jj72
8.7
CVSS 4.0 · Vendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
Share

Severity by source

Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007) PRIMARY
8.7 HIGH
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
9.0 CRITICAL

Network-delivered via web UI (AV:N); attacker needs object-creation privilege (PR:L); victim must navigate to the affected tab (UI:R); injected SQL executes in victim's PostgreSQL session under victim's credentials, constituting a scope change (S:C).

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE
8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat
8.8 HIGH
qualitative

Primary rating from Vendor (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007).

CVSS VectorVendor: f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

4
Patch available
Jul 31, 2026 - 17:01 EUVD
Source Code Evidence Fetched
Jul 31, 2026 - 16:33 vuln.today
Analysis Generated
Jul 31, 2026 - 16:33 vuln.today
CVE Published
Jul 31, 2026 - 16:16 cve.org
HIGH 8.7

DescriptionCVE.org

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.

AnalysisAI

SQL injection in pgAdmin 4 through an incomplete remediation of CVE-2026-12044 allows a low-privileged authenticated user to execute arbitrary SQL in a higher-privileged victim's database session. By creating a PostgreSQL object - table, index, publication, or subscription - with an apostrophe in its name (a character PostgreSQL legally permits in quoted identifiers), the attacker plants a payload that fires the moment any other pgAdmin user opens the object's Statistics or Dependencies tab, triggering raw Jinja2 template interpolation in coll_stats.sql, dependencies.sql, and get_position.sql without the qtLiteral escaping applied by the prior fix. The cross-user injection escalates impact well beyond the attacker's own database privileges, with the injected SQL executing under the victim's session credentials. No public exploit has been identified at time of analysis, and this CVE has not been added to the CISA KEV catalog.

Technical ContextAI

pgAdmin 4 is an open-source, web-based PostgreSQL administration GUI that uses Jinja2 templating to construct and execute SQL queries against connected database backends, including both community PostgreSQL and EDB Postgres Advanced Server (PPAS/EPAS). The root cause is CWE-89 (SQL Injection) arising from unsanitized interpolation of object names into SQL string literals via the raw '{{ name }}' Jinja2 pattern. The prior fix for CVE-2026-12044 (pgAdmin 4 9.16) introduced the qtLiteral(conn) filter - which uses the live libpq connection to apply PostgreSQL-native quoting - but incorrectly placed four families of template sinks in the lint ALLOWLIST in test_sql_string_literal_lint.py under the false assumption that names sourced from pg_catalog via the browser tree could not contain apostrophes. PostgreSQL's quoted-identifier syntax ("it'satable") permits arbitrary Unicode characters including apostrophes, invalidating that assumption. The missed sinks are: (1) schemas/tables/templates/indexes/sql/16_plus/coll_stats.sql and sql/default/coll_stats.sql for the all-indexes statistics listing, interpolating {{schema}} and {{table}}; (2) publications/templates/publications/pg/default/sql/dependencies.sql and get_position.sql, interpolating {{pname}} and {{pubname}}; (3) the same two files under the ppas/ dialect path; and (4) subscriptions/templates/subscriptions/sql/default/dependencies.sql and get_position.sql, interpolating {{subname}}. A secondary omission in publications/__init__.py and subscriptions/__init__.py failed to pass conn=self.conn into the render_template call, meaning even if qtLiteral had been applied in the templates, the filter would have lacked a connection object to quote against.

RemediationAI

Upgrade to pgAdmin 4 9.17, which applies qtLiteral(conn) escaping to all previously unescaped template sinks and removes the incorrect ALLOWLIST entries from test_sql_string_literal_lint.py. The fix is confirmed in upstream commits 73b3218 and f75452b; a formally released patched version numbered 9.17 is implied but should be confirmed against the official pgAdmin release page before deployment. If immediate upgrade is not possible, the most effective compensating control is to revoke CREATE TABLE, CREATE PUBLICATION, and CREATE SUBSCRIPTION privileges from any non-fully-trusted PostgreSQL users on instances managed through shared pgAdmin installations - this eliminates the attacker's ability to plant the apostrophe-containing object name that seeds the injection. As a secondary measure, restricting pgAdmin access so that only a single trusted user or role uses each pgAdmin instance prevents cross-user injection entirely, though this may conflict with team workflows. There is no known pgAdmin configuration option to disable the Statistics or Dependencies tabs independently. Organizations running pgAdmin 9.16 under the assumption that CVE-2026-12044 fully resolved SQL injection risks should treat this as an unmitigated exposure and prioritize the 9.17 upgrade accordingly.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected

Share

CVE-2026-17346 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy