Skip to main content

pgAdmin 4 EUVDEUVD-2026-37968

| CVE-2026-12048 CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-06-18 PostgreSQL GHSA-vmw6-74fq-69v8
9.3
CVSS 4.0 · Vendor: PostgreSQL
View

Attack ChainAIDerived

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

  1. Access
    Gain CREATE privilege or run hostile Postgres server
  2. Delivery
    Plant object name with iframe srcdoc payload
  3. Exploit
    Victim DBA connects pgAdmin or runs EXPLAIN
  4. Execution
    html-react-parser renders injected HTML in pgAdmin DOM
  5. Persist
    Iframe srcdoc loads attacker JS, rewrites parent.location
  6. Impact
    Spoofed pgAdmin dialog harvests credentials/session data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

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

Exploitation Conditions

Requires (1) the victim to connect their pgAdmin 4 (versions 6.0 through 9.15) to a PostgreSQL server whose ErrorResponse text the attacker controls - either a fully attacker-operated server or a shared/multi-tenant instance where the attacker has CREATE privilege on objects whose names a DBA will later reference, AND (2) the victim to trigger a user-facing sink that passes server text through html-react-parser, such as initiating a connection that fails post-connection SQL, running an EXPLAIN whose plan references the crafted object name, or interacting with a relation that returns a 'relation does not exist' ErrorResponse. Limiting factors: UI:A user interaction is required (the DBA must actively connect or view the crafted object), exploitation depends on attacker influence over server-returned text rather than any pgAdmin-side authentication, and successful redirection-style phishing further requires the victim to enter credentials into the spoofed dialog.

Impact

The vendor-assigned CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N, base 9.3) reflects that the victim need only connect pgAdmin to the malicious server or view a crafted EXPLAIN plan (UI:A - active user interaction), with high confidentiality and integrity impact on both the vulnerable system and downstream systems reachable through the authenticated pgAdmin session. PR:N is defensible because the attacker prerequisite is server-side (a hostile PostgreSQL or a low-privilege DB role allowed to create objects), not pgAdmin authentication. No EPSS, KEV, or SSVC data was supplied, and no public exploit identified at time of analysis, so this should be treated as a high-severity defensive priority rather than confirmed in-the-wild abuse; the realistic risk is highest for organisations whose DBAs connect pgAdmin to shared, multi-tenant, or untrusted PostgreSQL instances. Note that UI:A indicates user interaction is required, which slightly tempers the raw score in mass-exploitation scenarios.

Exploit ScenarioDerived

An attacker who controls a PostgreSQL server (or who has CREATE privilege on a database a DBA will inspect) creates a relation, column, or expression whose name contains an <iframe srcdoc="..."> payload. When the victim DBA connects pgAdmin to that server or runs an EXPLAIN that surfaces the crafted name in a 'relation does not exist' error or in a Recheck Cond field, the iframe renders inside pgAdmin's origin and rewrites parent.location to an attacker-hosted page that visually impersonates a pgAdmin dialog, harvesting credentials or DB connection details.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 19, 2026

Stored cross-site scripting in pgAdmin 4 versions 6.0 through 9.15 allows a malicious or attacker-influenced PostgreSQL server to inject arbitrary HTML into pgAdmin's interface via ErrorResponse messages and EXPLAIN plan fields rendered through html-react-parser. Because the injection executes inside pgAdmin's own DOM, an attacker can render convincing phishing dialogs or redirect the top-level tab via iframe srcdoc, bypassing standard X-Frame-Options and frame-ancestors protections. No public exploit identified at time of analysis, but the vendor has shipped a multi-layer fix in 9.16.

RemediationAI

Vendor-released patch: pgAdmin 4 version 9.16 - upgrade immediately, referencing the upstream commit https://github.com/pgadmin-org/pgadmin4/commit/9e370d3cb67b83b3945f82969c959fad3f926517 and tracking issue https://github.com/pgadmin-org/pgadmin4/issues/10068. The fix combines DOMPurify sanitisation around every html-react-parser call site, a new plain-text rendering contract (SafeMessage/SafeHtmlMessage and Notifier.errorText/alertText/warningText/infoText/successText helpers used by ~50 migrated callers), and backend HTML-escaping in execute_post_connection_sql via the new sanitize_external_text helper plus _.escape on Recheck Cond and Exact Heap Blocks in the EXPLAIN plan renderer. Until upgrade is possible, restrict pgAdmin to connecting only to trusted PostgreSQL instances, avoid registering servers controlled by other tenants, and prohibit DBAs from running EXPLAIN against tables whose names or filter conditions originate from untrusted low-privilege users; these controls reduce attack surface but do not eliminate it because any DB role permitted to CREATE objects can craft a poisoned name.

Affected VersionsENISA

pgAdmin 4 6.0 <9.16

Affected Packages

euvd pgadmin_4 fix: 9.16

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 the official web-based administration UI for PostgreSQL, built on a Python/Flask backend and a React frontend. The root cause is CWE-79 (improper neutralization of input during web page generation): server-supplied text - particularly object names quoted back in 'relation does not exist' ErrorResponse payloads and EXPLAIN node fields such as 'Recheck Cond' and 'Exact Heap Blocks' - was passed verbatim to html-react-parser at numerous user-facing sinks (notifier toasts, FormFooterMessage, FormNote, ModalProvider AlertContent/confirmDelete, ToolErrorView, the Explain visualiser's NodeText panel, SQL editor confirm dialogs, ConfirmSaveContent, PreferencesHelper modal alerts, SelectThemes). html-react-parser converts arbitrary HTML strings into React elements, so any unsanitised attacker-controlled markup - including <iframe srcdoc> - was instantiated inside the trusted pgAdmin origin. The CPE cpe:2.3:a:pgadmin.org:pgadmin_4 confirms the affected product.

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 (PostgreSQL) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
vuln.today AI 9.3 CRITICAL

Attacker controls upstream Postgres text (PR:N relative to pgAdmin), victim must connect or view a plan (UI:R), injection crosses from server-data origin into pgAdmin's trusted DOM (S:C) with high C/I impact and no availability effect.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
SUSE 8.0 HIGH
AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

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

DescriptionCVE.org

Stored cross-site scripting in pgAdmin 4's error-rendering and plan-node-rendering paths. Text returned by a PostgreSQL server (ErrorResponse messages, including object names quoted back inside relation-does-not-exist errors and inside EXPLAIN Recheck Cond / Exact Heap Blocks fields) was passed verbatim through html-react-parser at every user-facing sink - the notifier toasts, FormFooterMessage / FormInput help and error areas, FormNote, ModalProvider AlertContent and confirmDelete, ToolErrorView, the Explain visualiser's NodeText panel, the SQL editor confirm dialogs, ConfirmSaveContent, PreferencesHelper modal alerts, and SelectThemes helper text. A PostgreSQL server an attacker controls - or any server returning attacker-influenced text such as a table or column name a low-privilege database user can create - could inject arbitrary HTML (including <iframe>) into the pgAdmin DOM the moment the victim's pgAdmin connected to that server or viewed an Explain plan that referenced the crafted object.

The injected iframe's srcdoc could fetch attacker-served JavaScript and, by writing to parent.location, redirect the victim's top-level pgAdmin browser tab to an attacker-controlled URL. Because the injection originates from inside pgAdmin's own interface, standard anti-clickjacking controls (X-Frame-Options, Content-Security-Policy: frame-ancestors) do not mitigate it. A phishing page rendered inside the legitimate pgAdmin window is indistinguishable from a genuine pgAdmin dialog.

Fix combines three complementary layers. (1) DOMPurify sanitisation is wrapped around every html-react-parser call site reachable from notifier, alert, form-error, Explain, and SQL-editor flows. (2) A new plain-text rendering contract - SafeMessage / SafeHtmlMessage components plus Notifier.errorText / alertText / warningText / infoText / successText helpers - is introduced; around fifty callers across browser, tools, dashboard, debugger, misc, llm, preferences, schema diff, and the SQL editor that previously interpolated backend-derived strings are migrated to the plain-text variants. (3) Backend HTML-escape is applied at the post-connection-SQL handler (execute_post_connection_sql) via a new sanitize_external_text helper, so third-party JSON consumers (audit logs, API clients) never receive raw markup either; the Explain plan-info renderer is also patched to _.escape Recheck Cond and Exact Heap Blocks at construction (matching every sibling field), giving defence in depth even before DOMPurify runs.

This issue affects pgAdmin 4: from 6.0 before 9.16.

Executive ViewAI

Why It Matters

pgAdmin 4 versions 6.0 through 9.15 contain a critical vulnerability that allows attackers to inject malicious code through compromised database connections, enabling credential theft from database administrators. This compromises both database security and privileged administrative access-core control points for most organizations. All pgAdmin deployments should be prioritized for immediate patching to version 9.16 or later.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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
Very High
Technical Impact
Total

Priority Score

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

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

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 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Not-Affected
SUSE Linux Enterprise Server 15 SP7 Not-Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Not-Affected

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