Impact
Stored cross‑site scripting exists in the error‑rendering and plan‑node rendering paths of pgAdmin 4. Arbitrary text returned by a PostgreSQL server—such as error messages, object names, or EXPLAIN output— is passed unchecked through the html‑react‑parser library to many front‑end sinks (toasts, form helpers, editor dialogs, and the explain visualiser). An attacker who controls the PostgreSQL server or can influence the names of database objects can inject malicious HTML, including iframes, that runs in the context of the pgAdmin page. The injected iframe can load attacker‑served JavaScript and redirect the user to a phishing or malicious URL. Because the content originates from pgAdmin itself, standard click‑jacking controls such as X‑Frame‑Options and CSP frame‑ancestors do not provide protection.
Affected Systems
The vulnerability affects all pgAdmin 4 installations from version 6.0 up to, but excluding, version 9.16. The attack can be carried out against any instance that connects to a PostgreSQL server an attacker can manipulate, or to a server that permits low‑privilege users to create objects with harmful names.
Risk and Exploitability
The CVSS score of 9.3 marks the issue as critical, and while an EPSS score is not published, the lack of a KEV listing indicates it has not yet been widely abused. Exploitation requires a user with a browser session against a compromised or maliciously configured PostgreSQL instance; the vulnerability is indirect, leveraging the server’s ability to inject custom text. Because the flaw occurs at rendering time within pgAdmin itself, web‑application firewalls that block XSS payloads only in untrusted content may still allow the injection if the payload is injected via server messages.
OpenCVE Enrichment