Skip to main content

PostgreSQL EUVDEUVD-2026-18472

| CVE-2026-34725 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-04-01 https://github.com/dbgate/dbgate GHSA-35xm-qvjg-8m42
8.2
CVSS 3.1 · Vendor: https://github.com/dbgate/dbgate
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Store malicious SVG string with embedded script
  2. Delivery
    Icon rendered via {@html} without sanitization
  3. Exploit
    Script executes in user browser
  4. Execution
    Electron nodeIntegration allows require()
  5. Impact
    Load and execute arbitrary code locally

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

DbGate with Electron desktop app configured with nodeIntegration: true and contextIsolation: false. Attacker must have local user access (PR:L) and victim must interact with UI rendering the malicious icon (UI:R). Web UI variant requires victim to view attacker-stored SVG content.

Impact

Real-world risk is HIGH for Electron desktop users, MEDIUM for web deployments. The CVSS 8.3 score (AV:L/AC:L/PR:L/UI:R) correctly reflects local attack vector requiring low-privileged user interaction, but undersells the severity in multi-user or shared-definition scenarios. Attack complexity is genuinely low-attackers need only craft a JSON file with malicious applicationIcon and social-engineer victims to import it or place it in a shared app definition directory. The Changed scope (S:C) acknowledges privilege escalation from XSS to RCE in Electron. No EPSS score provided, but the combination of detailed public POC (demonstrated file write via require('fs')) and straightforward exploitation path suggests meaningful real-world risk. Not present in CISA KEV, indicating no confirmed active exploitation campaigns at time of analysis. SSVC factors: Exploitation status is POC-available, automatable is NO (requires user to import malicious file and navigate to triggering UI), technical impact is TOTAL in Electron (arbitrary code execution). Priority depends on deployment model-Electron desktop users should treat as critical; web-only deployments face standard stored XSS risks. The vendor-supplied patch (GitHub commit a7d2ed1) likely adds SVG sanitization and may reconfigure Electron security settings.

Exploit ScenarioDerived

An attacker crafts a malicious application definition JSON file containing an SVG icon payload with embedded onerror handlers invoking Node.js APIs, such as require('fs').writeFileSync() to drop malware or require('child_process').exec() to run system commands. The attacker social-engineers a victim database administrator into importing this file as a custom application definition, or places it in a shared network directory that DbGate scans for application configs. When the victim opens DbGate desktop and navigates to a database view matching the usageRules in the malicious definition, the FontIcon component renders the applicationIcon via {@html}, executing the JavaScript payload. Because Electron nodeIntegration is enabled, the payload successfully writes files to disk, exf

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 01, 2026

Stored XSS in DbGate npm package escalates to remote code execution in Electron desktop app via unsanitized SVG icon rendering. Attackers who inject malicious SVG payloads into application definition files can execute arbitrary JavaScript when victims view matching database entries. In the Electron desktop client, insecure configuration (nodeIntegration: true, contextIsolation: false) allows XSS payloads to invoke Node.js APIs, enabling local code execution including file system access. Web depl

Earlier versions of this analysis (1)
v1 Apr 01, 2026 - 23:16 CVSS 8.2

Stored XSS in DbGate npm package escalates to remote code execution in Electron desktop app via unsanitized SVG icon rendering. Attackers who inject malicious SVG payloads into application definition files can execute arbitrary JavaScript when victims view matching database entries. In the Electron desktop client, insecure configuration (nodeIntegration: true, contextIsolation: false) allows XSS payloads to invoke Node.js APIs, enabling local code execution including file system access. Web deployments face session hijacking and credential theft. EPSS data not available; vendor patch released via GitHub commit a7d2ed1. No active exploitation confirmed (not in CISA KEV), but detailed proof-of-concept demonstrates both XSS and RCE paths.

RemediationAI

Apply the vendor-released patch immediately by upgrading to DbGate versions incorporating commit a7d2ed11f3f3d4dfb5d2e4e5467dedafa5fa947e or later from the official GitHub repository at github.com/dbgate/dbgate. The patch likely implements SVG sanitization in FontIcon.svelte using DOMPurify or equivalent HTML sanitization library, and may reconfigure Electron to disable nodeIntegration and enable contextIsolation per Electron security best practices. Until patching is complete, implement defense-in-depth mitigations: restrict file system permissions so only trusted administrators can place application definition JSON files in DbGate's apps storage directories, disable or carefully audit any application import features accessible to untrusted users, and for web deployments implement Content Security Policy headers to limit inline script execution. Electron desktop users should consider running DbGate in sandboxed environments or under restricted user accounts until the patch is applied. Review application definition files for unexpected SVG or HTML content in applicationIcon fields. Full technical details and proof-of-concept are documented in the GitHub Security Advisory at github.com/dbgate/dbgate/security/advisories/GHSA-35xm-qvjg-8m42 and patch commit github.com/dbgate/dbgate/commit/a7d2ed11f3f3d4dfb5d2e4e5467dedafa5fa947e.

Affected VersionsENISA

dbgate 7.0.0, < 7.1.5

Affected Packages

npm dbgate-web fix: 7.1.5
euvd dbgate_7_0_0 fix: 7.1.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

DbGate is an open-source database management tool distributed as both a web application (pkg:npm/dbgate-web) and Electron desktop client. The vulnerability stems from improper neutralization of input (CWE-79) in the icon rendering pipeline. The Svelte component FontIcon.svelte uses the {@html} directive to render SVG strings without DOMPurify or equivalent sanitization. Application definitions containing the applicationIcon field are loaded from disk by packages/api/src/controllers/apps.js and passed through DatabaseAppObject.svelte and AppObjectCore.svelte components before reaching FontIcon. Any string beginning with '<svg' triggers raw HTML rendering, creating a stored XSS sink. The Electron desktop app exacerbates this by configuring BrowserWindow with nodeIntegration: true and contextIsolation: false in app/src/electron.js, violating Electron security best practices. This configuration grants renderer processes direct access to Node.js require(), enabling XSS payloads to invoke fs, child_process, and other Node modules for arbitrary code execution on the host operating system.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/dbgate/dbgate) PRIMARY 8.2 HIGH
AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Primary rating from Vendor (https://github.com/dbgate/dbgate) · only source for this CVE.

CVSS VectorVendor: https://github.com/dbgate/dbgate

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Apr 01, 2026 - 23:16 nvd
Patch available
CVE Published
Apr 01, 2026 - 22:19 nvd
HIGH 8.2

DescriptionCVE.org

Summary

A stored XSS vulnerability exists in DbGate because attacker-controlled SVG icon strings are rendered as raw HTML without sanitization. In the web UI this allows script execution in another user's browser; in the Electron desktop app this can escalate to local code execution because Electron is configured with nodeIntegration: true and contextIsolation: false.

Details

The issue is in the icon rendering path:

  • packages/web/src/icons/FontIcon.svelte
  • treats any icon string starting with <svg as inline SVG
  • renders it with {@html iconValue} without sanitization
  • packages/api/src/controllers/apps.js
  • loads app definitions from disk and returns applicationIcon to clients unchanged
  • packages/web/src/appobj/DatabaseAppObject.svelte
  • passes applicationIcon into additionalIcons
  • packages/web/src/appobj/AppObjectCore.svelte
  • renders those icons through <FontIcon icon={ic.icon}>

This makes applicationIcon a stored XSS sink.

An attacker who can create or modify an app definition can store a payload in applicationIcon. When another user views a matching database/app entry, the payload executes in that user's session.

The impact is especially severe in Electron desktop because:

  • app/src/electron.js
  • nodeIntegration: true
  • contextIsolation: false

With that configuration, JavaScript gained through XSS can access Node/Electron APIs, making local code execution possible.

PoC

This was reproduced by creating an app definition with a malicious applicationIcon and making it match a visible database.

Example payload:

json
{
  "applicationName": "XSS PoC",
  "applicationIcon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><circle cx=\"9\" cy=\"9\" r=\"8\" fill=\"red\"/></svg><img src=x onerror=\"alert('xss-fired')\">",
  "usageRules": [
    {
      "serverHostsList": ["postgres"],
      "databaseNamesList": ["dbgate"]
    }
  ]
}

After saving this app definition and opening the UI where the matching database/app icon is rendered, the JavaScript executes.

RCE In Electron app:

  1. Prepare an attacker-controlled application JSON file with a malicious applicationIcon value.
  2. Set usageRules so the application matches a database the victim is likely to view.
  3. Example payload:
json
{
  "applicationName": "XSS PoC",
  "applicationIcon": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\"><circle cx=\"9\" cy=\"9\" r=\"8\" fill=\"red\"/></svg><img src=x onerror=\"require('fs').writeFileSync(require('path').join(process.cwd(),'xss-rce-poc.txt'),'poc')\">",
  "usageRules": [
    {
      "serverHostsRegex": ".*",
      "databaseNamesRegex": ".*"
    }
  ]
}
  1. Deliver this JSON file to the victim as an application definition file.
  2. The victim imports or saves the file into DbGate's apps storage, for example by opening/creating an application file and saving the attacker-controlled JSON content.
  3. DbGate later loads that app definition through apps/get-all-apps.
  4. When the victim opens a UI view that renders the matching database/application icon, the applicationIcon value is passed into FontIcon.
  5. FontIcon detects that the string starts with <svg and renders it via raw {@html}.
  6. The injected HTML executes in the Electron renderer process.
  7. Because DbGate Desktop uses nodeIntegration: true and contextIsolation: false, the payload can access Node APIs and write the marker file xss-rce-poc.txt

This demonstrates that a malicious saved application JSON file can become stored XSS in the UI and escalate to local code execution in Electron.

Impact

Web app If an attacker can place a malicious application definition where another user will load it, arbitrary JavaScript executes in the victim's browser session. This can lead to token theft, session hijacking, and performing privileged actions as the victim inside DbGate.

Electron desktop app In the desktop app, the impact is more severe because the Electron renderer is configured with nodeIntegration: true and contextIsolation: false. If a victim imports or saves a malicious application definition and later opens a UI view that renders the icon, the XSS can access Node/Electron APIs and may result in local code execution on the victim machine.

Executive ViewAI

Why It Matters

DbGate npm package versions prior to the patched release contain a stored cross-site scripting (XSS) vulnerability in SVG icon processing that escalates to remote code execution in Electron desktop deployments due to insecure isolation settings. Organizations using DbGate's Electron client face direct risk of arbitrary code execution on user workstations, while web deployments are vulnerable to session hijacking and credential theft through malicious database definition files.

Business Impact: High
Compensating Controls

If immediate patching is not feasible: restrict access to DbGate database definition file uploads to trusted administrators only; disable Electron client usage in favor of web deployment pending patch application; implement network segmentation to limit lateral movement from compromised workstations; monitor file system and process execution logs for anomalous activity on systems running DbGate. Apply vendor patch as soon as operationally possible-compensating controls do not eliminate RCE risk in Electron environments.

Threat Intelligence Overview

EPSS Score
0.0%
Top 94% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy