Skip to main content

pgAdmin 4 CVE-2026-12048

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

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

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

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/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
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Jun 19, 2026 - 00:31 vuln.today
Analysis Generated
Jun 19, 2026 - 00:31 vuln.today
CVE Published
Jun 18, 2026 - 23:37 cve.org
CRITICAL 9.3

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.

AnalysisAI

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

Unlock full vulnerability intelligence

  • Risk assessment & exploitation conditions
  • Attack chain visualization
  • Remediation with exact patch versions
  • Threat intelligence from 22 sources
  • Personal watchlist & email alerts

Free forever · No credit card required

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata

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

Vulnerability AssessmentAI

Exploitation 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. … Additional conditions and limiting factors are described in the full assessment.
Risk Assessment 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. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in.
Exploit Scenario 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.
Remediation 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. … Detailed patch versions, workarounds, and compensating controls in full report.

Recommended ActionAI

Within 24 hours: Identify all pgAdmin 4 instances running versions 6.0-9.15; prioritize internet-facing instances and those connecting to databases outside your direct control. …

Sign in for detailed remediation steps and compensating controls.

Threat intelligence, references, and detailed analysis are available after sign-in.

Share

CVE-2026-12048 vulnerability details – vuln.today

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