Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-12047: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pgadmin.org pgAdmin 4

0
Low
VulnerabilityCVE-2026-12047cvecve-2026-12047cwe-79cwe-116
Published: Thu Jun 18 2026 (06/18/2026, 23:37:39 UTC)
Source: CVE Database V5
Vendor/Project: pgadmin.org
Product: pgAdmin 4

Description

CVE-2026-12047 is a cross-site scripting (XSS) vulnerability in pgAdmin 4 affecting versions from 6.6 up to but not including 9.16. The issue arises from improper HTML encoding of exception messages from cloud SDKs (AWS, Azure, Google) that are included verbatim in JSON responses and rendered as HTML in the Cloud Wizard frontend. An authenticated user can inject malicious HTML/JavaScript via crafted credentials, leading to self-targeted XSS and potential escalation to other users if combined with a valid CSRF token. The vulnerability affects multiple endpoints related to cloud deployment and credential verification. A fix is available that properly HTML-escapes external exception strings and renders messages in plain text to prevent HTML parsing.

CVSS v3.1

Score 3.5low

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N

Affected software

GitHub Actionsmore threats →cve
pgAdmin 4
pkg:github/pgAdmin 4
Affected versions
>=6.6 <9.16

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/19/2026, 16:55:00 UTC

Technical Analysis

This vulnerability involves improper neutralization of input during web page generation in pgAdmin 4's cloud deployment module. Exception messages from AWS, Azure, and Google SDKs are included without HTML encoding in JSON response fields (info and errormsg). The Cloud Wizard frontend uses html-react-parser to render these messages, allowing attacker-controlled HTML to be injected into the DOM. The primary attack vector is an authenticated user submitting a crafted access_key that triggers an exception containing the payload, which is then rendered and executed in the victim's browser context. Because the injection occurs within pgAdmin's own interface, standard frame-based mitigations like X-Frame-Options and Content-Security-Policy frame-ancestors do not prevent exploitation. Exploitation is primarily self-targeted, but cross-user attacks require a CSRF token. Multiple endpoints exhibiting this pattern were fixed by introducing a shared sanitize_external_text helper that HTML-escapes exception strings and rendering backend messages in plain-text mode on the frontend. The vulnerability affects pgAdmin 4 versions from 6.6 up to but not including 9.16.

Potential Impact

The vulnerability allows an authenticated user to inject malicious HTML and JavaScript into their own pgAdmin 4 interface via cloud deployment-related endpoints, leading to self-targeted cross-site scripting. This can result in redirection of the user's pgAdmin tab to attacker-controlled sites. Exploitation against other authenticated users requires an additional CSRF attack with a valid CSRF token. There is no direct impact on confidentiality or availability reported. The CVSS score is 3.5 (low severity), reflecting limited impact and the requirement for authentication and user interaction.

Mitigation Recommendations

A patch is available that properly HTML-escapes all external SDK exception strings before including them in JSON responses and renders these messages in plain-text mode on the frontend to prevent HTML parsing. Since pgAdmin 4 is a cloud service, the vendor manages remediation for this cloud-hosted service. Users should upgrade to version 9.16 or later where this issue is fixed. Until then, avoid submitting crafted credentials that could trigger this vulnerability. No additional mitigations such as frame-ancestors or X-Frame-Options are effective against this issue due to its rendering context.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
PostgreSQL
Date Reserved
2026-06-11T20:40:07.824Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null
Is Cloud Service
true

Threat ID: 6a357432f198dc38c1bc0d39

Added to database: 6/19/2026, 4:54:10 PM

Last enriched: 6/19/2026, 4:55:00 PM

Last updated: 6/19/2026, 6:29:46 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses