CVE-2026-12047: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pgadmin.org pgAdmin 4
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.
AI Analysis
Technical Summary
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.
CVE-2026-12047: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pgadmin.org 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
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.