Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-12048— pgAdmin 4: Stored XSS via untrusted error and plan-node text rendered through html-react-parser

Quick assessment

Affected
pgadmin.org pgAdmin 4
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

pgadmin 4是pgAdmin组织开源的一款数据库管理工具。 pgAdmin 4 6.0版本至9.16之前版本存在安全漏洞,该漏洞源于错误处理和计划节点渲染路径中PostgreSQL服务器返回的文本被直接通过html-react-parser传入用户界面多个组件,可能导致未经身份验证的攻击者在受害者pgAdmin连接其控制的服务器或查看引用特制对象的Explain计划时,向pgAdmin DOM注入任意HTML(包括iframe),进而通过iframe的srcdoc加载恶意JavaScript并重定向

CVSS 9.3 · Critical EPSS 0.27% · P18

Affected Version Matrix 1

VendorProduct Version RangeStatus
pgadmin.org pgAdmin 4 6.0< 9.16 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-12048

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
pgAdmin 4: Stored XSS via untrusted error and plan-node text rendered through html-react-parser
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
Source: CVE Program / CVE List V5
Vulnerability Title
pgadmin 4 输出处理不当漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
pgadmin 4是pgAdmin组织开源的一款数据库管理工具。 pgAdmin 4 6.0版本至9.16之前版本存在安全漏洞,该漏洞源于错误处理和计划节点渲染路径中PostgreSQL服务器返回的文本被直接通过html-react-parser传入用户界面多个组件,可能导致未经身份验证的攻击者在受害者pgAdmin连接其控制的服务器或查看引用特制对象的Explain计划时,向pgAdmin DOM注入任意HTML(包括iframe),进而通过iframe的srcdoc加载恶意JavaScript并重定向
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
pgadmin.org pgAdmin 4 6.0 ~ 9.16 -

II. Public POCs for CVE-2026-12048

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 6339 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-12048

请登录查看更多情报信息。

Same Patch Batch · pgadmin.org · 2026-06-18 · 7 CVEs total

CVE-2026-12045 9.0 CRITICAL pgAdmin 4: AI Assistant read-only transaction bypass allows unauthorised writes and remote
CVE-2026-12046 9.0 CRITICAL pgAdmin 4: Unauthenticated pickle deserialization in SQL Editor close / update_connection
CVE-2026-12044 8.8 HIGH pgAdmin 4: SQL injection in COMMENT ON ... IS '<description>' rendering across dialog temp
CVE-2026-12049 4.3 MEDIUM pgAdmin 4: Open redirect in multi-factor authentication flow via unvalidated 'next' parame
CVE-2026-12050 4.3 MEDIUM pgAdmin 4: SQL injection in named restore point endpoint
CVE-2026-12047 3.5 LOW pgAdmin 4: HTML injection in cloud verify_credentials / deploy endpoints via unsanitised S

IV. Related Vulnerabilities

V. Comments for CVE-2026-12048

No comments yet


Leave a comment