Skip to main content

pgAdmin 4 EUVDEUVD-2026-51559

| CVE-2026-17346 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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker obtains low-privilege pgAdmin and PostgreSQL account
  2. Delivery
    Creates table, publication, or subscription with apostrophe-containing name via quoted identifier
  3. Exploit
    Malicious object name persisted in pg_catalog
  4. Install
    Victim DBA navigates to Statistics or Dependencies tab in pgAdmin browser tree
  5. C2
    pgAdmin renders coll_stats.sql or dependencies.sql with raw `{{ name }}` interpolation
  6. Execute
    Apostrophe breaks SQL string boundary, injecting attacker SQL
  7. Impact
    Injected statements execute in victim's database session with victim's privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to hold a low-privileged pgAdmin and PostgreSQL account on the same instance as potential victims, with at least one of the following object-creation privileges granted: CREATE TABLE or CREATE INDEX (to exploit the Index Statistics coll_stats.sql sink, present since pgAdmin 1.0), CREATE PUBLICATION (to exploit the Publications dependencies.sql and get_position.sql sinks, present since pgAdmin 5.0), or CREATE SUBSCRIPTION (to exploit the Subscriptions dependencies.sql and get_position.sql sink, present since pgAdmin 5.0). The attacker must create an object with an apostrophe in its name using PostgreSQL's double-quoted identifier syntax (e.g., CREATE TABLE "foo'bar" (...)). A second condition is that a different pgAdmin user - the injection victim - must navigate to the Statistics tab (for index sinks) or Dependencies tab (for publication/subscription sinks) of the affected object in the pgAdmin browser tree. The victim's database session privileges determine the blast radius of the injected SQL. Deployments where only a single trusted user operates the pgAdmin instance, or where untrusted users are denied all CREATE rights on PostgreSQL objects, are not exploitable. The vulnerability does not affect the single-index stats.sql path already fixed by CVE-2026-12044; only the all-indexes coll_stats.sql listing and the publication/subscription dependency queries are vulnerable in 9.16.

Impact

The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H) reflects severe confidentiality, integrity, and availability impact over a network with low complexity. The PR:L metric correctly identifies that exploitation requires a low-privileged account with object creation rights. The UI:N designation warrants scrutiny: a second user must actively navigate to the Statistics or Dependencies tab to trigger the payload, which constitutes a user interaction dependency not reflected in the vector - the real-world trigger is victim routine navigation rather than a fully autonomous attack. Real-world risk is meaningfully elevated for multi-tenant or shared-instance pgAdmin deployments (DBaaS platforms, development team shared tools) where untrusted users coexist with administrators on the same pgAdmin instance. Single-user or single-tenant deployments where only one trusted user operates pgAdmin are not realistically exploitable. The incomplete-fix nature is a material priority signal: organizations that applied pgAdmin 9.16 believing CVE-2026-12044 was fully resolved remain exposed without knowing it. No EPSS score is provided in the input; no KEV listing exists. The combination of no public POC, the PR:L precondition, and the victim-navigation trigger suggests moderate-to-high organizational priority rather than immediate mass exploitation risk - but the cross-user privilege escalation mechanism makes this a meaningful threat in shared environments.

Exploit ScenarioDerived

A low-privileged developer with a shared pgAdmin account and CREATE TABLE rights on a team PostgreSQL instance creates a table named using PostgreSQL quoted-identifier syntax that embeds an apostrophe followed by injected SQL - for example, naming the table such that, when its name is interpolated into coll_stats.sql as schemaname = 'public' AND stat.relname = '<name>', the apostrophe breaks out of the string literal. When a database administrator later opens the Index Statistics tab for that schema's indexes in pgAdmin's browser tree, the unescaped {{table}} substitution executes the attacker's injected statement in the DBA's database session with the DBA's credentials. No public exploit code has been identified at time of analysis, but the fix diffs make the vulnerable template patterns and required payload structure immediately apparent to any reviewer.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 31, 2026

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.

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.

Affected VersionsENISA

pgAdmin 4 5.0 <9.17
pgAdmin 4 1.0 <9.17

Affected Packages

euvd pgadmin_4 fix: 9.17

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Pgadmin 4 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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

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

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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Jul 31, 2026 - 17:01 EUVD
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.

Executive ViewAI

Why It Matters

pgAdmin 4 contains an authenticated SQL injection vulnerability (CVSS 8.7) that allows a low-privileged user to plant malicious database objects that execute arbitrary SQL under any other user's session credentials when they view object statistics or dependencies-escalating attacker impact beyond their own permissions and potentially compromising sensitive data or database integrity across multiple users.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: enforce network-level access controls limiting pgAdmin to trusted administrative staff and subnets; require multi-factor authentication for pgAdmin login; implement database-level audit logging to detect anomalous SQL execution; restrict database object-creation permissions to only necessary administrative users; disable or restrict access to pgAdmin's Statistics and Dependencies features pending vendor patch availability.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Medium
widely used PostgreSQL GUI tool among developers and DBAs
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2024-2044 CRITICAL POC
9.9 Mar 07

pgAdmin <= 8.3 is affected by a path-traversal vulnerability while deserializing users’ sessions in the session handling

CVE-2024-3116 CRITICAL POC
9.8 Apr 04

pgAdmin <= 8.4 is affected by a Remote Code Execution (RCE) vulnerability through the validate binary path API. Rated cr

CVE-2026-12046 CRITICAL POC
9.5 Jun 18

Remote unauthenticated access to two SQL Editor endpoints in pgAdmin 4 server-mode deployments (versions 6.9 through 9.1

CVE-2022-4223 HIGH POC
8.8 Dec 13

The pgAdmin server includes an HTTP API that is intended to be used to validate the path a user selects to external Post

CVE-2024-9014 MEDIUM POC
6.5 Sep 23

pgAdmin versions 8.11 and earlier are vulnerable to a security flaw in OAuth2 authentication. Rated medium severity (CVS

CVE-2025-12762 CRITICAL
9.8 Nov 13

Remote code execution in pgAdmin 4 (versions up to and including 9.9) lets an attacker who can get a crafted PLAIN-forma

CVE-2026-12045 CRITICAL
9.4 Jun 18

Remote SQL injection via prompt injection in pgAdmin 4 versions 9.13 through 9.15 allows attackers who can write content

CVE-2026-17351 CRITICAL
9.4 Jul 31

SQL injection sandbox escape in pgAdmin 4's AI Assistant (versions 9.13 through 9.16) lets an attacker break out of the

CVE-2026-17566 CRITICAL POC
9.4 Jul 31

OS command injection in pgAdmin 4 (all versions before 9.18) lets an authenticated user with the commonly-granted tools_

CVE-2026-7813 CRITICAL
9.4 May 11

Authorization bypass and privilege escalation in pgAdmin 4 server mode allows authenticated users to access other users'

CVE-2024-4216 MEDIUM POC
5.4 May 02

pgAdmin <= 8.5 is affected by XSS vulnerability in /settings/store API response json payload. Rated medium severity (CVS

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

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