{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-34725",
        "tracking": {
            "current_release_date": "2026-04-03T15:35:18.289550Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-34725",
            "initial_release_date": "2026-04-01T23:02:31.938146Z",
            "revision_history": [
                {
                    "date": "2026-04-01T23:02:31.938146Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-04-01T23:02:40.366673Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-04-02T18:27:25.025774Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-04-02T18:27:26.428400Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-04-02T18:47:43.230690Z",
                    "number": "5",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (1).| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-04-02T19:39:49.535237Z",
                    "number": "6",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-04-03T15:31:07.896862Z",
                    "number": "7",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                }
            ],
            "status": "interim",
            "version": "7"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=7.0.0|<7.1.5",
                                "product": {
                                    "name": "vers:unknown/>=7.0.0|<7.1.5",
                                    "product_id": "CSAFPID-5985183"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "dbgate"
                    }
                ],
                "category": "vendor",
                "name": "dbgate"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-34725",
            "cwe": {
                "id": "CWE-79",
                "name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "### Summary\nA 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`.\n\n### Details\nThe issue is in the icon rendering path:\n\n- `packages/web/src/icons/FontIcon.svelte`\n  - treats any icon string starting with `<svg` as inline SVG\n  - renders it with `{@html iconValue}` without sanitization\n- `packages/api/src/controllers/apps.js`\n  - loads app definitions from disk and returns `applicationIcon` to clients unchanged\n- `packages/web/src/appobj/DatabaseAppObject.svelte`\n  - passes `applicationIcon` into `additionalIcons`\n- `packages/web/src/appobj/AppObjectCore.svelte`\n  - renders those icons through `<FontIcon icon={ic.icon}>`\n\nThis makes `applicationIcon` a stored XSS sink.\n\nAn 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.\n\nThe impact is especially severe in Electron desktop because:\n\n- `app/src/electron.js`\n  - `nodeIntegration: true`\n  - `contextIsolation: false`\n\nWith that configuration, JavaScript gained through XSS can access Node/Electron APIs, making local code execution possible.\n\n\n### PoC\nThis was reproduced by creating an app definition with a malicious `applicationIcon` and making it match a visible database.\n\nExample payload:\n\n```json\n{\n  \"applicationName\": \"XSS PoC\",\n  \"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')\\\">\",\n  \"usageRules\": [\n    {\n      \"serverHostsList\": [\"postgres\"],\n      \"databaseNamesList\": [\"dbgate\"]\n    }\n  ]\n}\n```\n\nAfter saving this app definition and opening the UI where the matching database/app icon is rendered, the JavaScript executes.\n\nRCE In Electron app: \n1. Prepare an attacker-controlled application JSON file with a malicious `applicationIcon` value.\n2. Set `usageRules` so the application matches a database the victim is likely to view.\n3. Example payload:\n\n```json\n{\n  \"applicationName\": \"XSS PoC\",\n  \"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')\\\">\",\n  \"usageRules\": [\n    {\n      \"serverHostsRegex\": \".*\",\n      \"databaseNamesRegex\": \".*\"\n    }\n  ]\n}\n```\n\n4. Deliver this JSON file to the victim as an application definition file.\n5. 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.\n6. DbGate later loads that app definition through apps/get-all-apps.\n7. When the victim opens a UI view that renders the matching database/application icon, the applicationIcon value is passed into FontIcon.\n8. FontIcon detects that the string starts with <svg and renders it via raw {@html}.\n9. The injected HTML executes in the Electron renderer process.\n10. Because DbGate Desktop uses nodeIntegration: true and contextIsolation: false, the payload can access Node APIs and write the marker file xss-rce-poc.txt\n\nThis demonstrates that a malicious saved application JSON file can become stored XSS in the UI and escalate to local code execution in Electron.\n\n### Impact\n**Web app**\nIf 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.\n\n**Electron desktop app**\nIn 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.",
                    "title": "github - https://api.github.com/advisories/GHSA-35xm-qvjg-8m42"
                },
                {
                    "category": "description",
                    "text": "DbGate is cross-platform database manager. From version 7.0.0 to before version 7.1.5, 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. This issue has been patched in version 7.1.5.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34725"
                },
                {
                    "category": "description",
                    "text": "DbGate is cross-platform database manager. From version 7.0.0 to before version 7.1.5, 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. This issue has been patched in version 7.1.5.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34725.json"
                },
                {
                    "category": "other",
                    "text": "0.00023",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "3.9",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "There is cwe data available from source Nvd",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5985183"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-35xm-qvjg-8m42"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34725"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34725.json"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/dbgate/dbgate/security/advisories/GHSA-35xm-qvjg-8m42"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/dbgate/dbgate/commit/a7d2ed11f3f3d4dfb5d2e4e5467dedafa5fa947e"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-35xm-qvjg-8m42"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; nvd",
                    "url": "https://github.com/dbgate/dbgate/releases/tag/v7.1.5"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
                        "baseScore": 8.2,
                        "baseSeverity": "HIGH"
                    },
                    "products": [
                        "CSAFPID-5985183"
                    ]
                }
            ],
            "title": "CVE-2026-34725"
        }
    ]
}