Junglewise Threat Intelligence

CVE-2026-12048: PostgreSQL pgAdmin 4 stored XSS in error and plan rendering

CVE-2026-12048 · Severity: critical · CVSS 9.3 · Published 2026-06-19

Executive brief

pgAdmin 4, a popular management tool for PostgreSQL databases, contains a security flaw that allows a malicious database server to take control of a user's management interface. If a user connects to a compromised server or views certain database plans containing malicious text, an attacker can inject hidden code into the pgAdmin window. This can be used to steal sensitive information, redirect the user to fraudulent websites, or perform unauthorized actions that appear to come from a legitimate source.

Technical details

A stored cross-site scripting (XSS) vulnerability exists in pgAdmin 4's error-rendering and plan-node-rendering paths. The application passed text returned by a PostgreSQL server (such as ErrorResponse messages or EXPLAIN plan fields) verbatim through the html-react-parser across multiple user-facing sinks, including notification toasts, modal alerts, and the SQL editor. An attacker controlling a malicious server, or a low-privileged user capable of creating objects with crafted names, can inject arbitrary HTML/JavaScript into the pgAdmin DOM. This bypasses standard anti-clickjacking controls like X-Frame-Options because the injection occurs within the legitimate application's context. The issue is resolved in version 9.16 through a combination of DOMPurify sanitization, a new plain-text rendering contract for backend-derived strings, and backend-side HTML escaping.

Affected products

  • PostgreSQL pgAdmin 4 6.0 to 9.15

Timeline

  • 2026-06-10: patched: Fix committed to repository
  • 2026-06-19: advisory: CVE published

References

Related threats