제출 #785841: DbGate DbGate Premium 7.1.4 Remote code execution via Stored XSS정보

제목DbGate DbGate Premium 7.1.4 Remote code execution via Stored XSS
설명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 I reproduced this by creating an app definition with a malicious applicationIcon and making it match a visible database. Example payload: { "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: Prepare an attacker-controlled application JSON file with a malicious applicationIcon value. Set usageRules so the application matches a database the victim is likely to view. Example payload: { "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": ".*" } ] } Deliver this JSON file to the victim as an application definition file. 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. DbGate later loads that app definition through apps/get-all-apps. When the victim opens a UI view that renders the matching database/application icon, the applicationIcon value is passed into FontIcon. FontIcon detects that the string starts with <svg and renders it via raw {@html}. The injected HTML executes in the Electron renderer process. 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.
사용자 ngocnn97 (UID 96701)
제출2026. 03. 23. AM 02:36 (1 월 ago)
모더레이션2026. 04. 13. PM 03:18 (21 days later)
상태수락
VulDB 항목357135 [DbGate 까지 7.1.4 SVG Icon String FontIcon.svelte applicationIcon 크로스 사이트 스크립팅]
포인트들17

Want to know what is going to be exploited?

We predict KEV entries!