{"schema":"threatline.record/2","record":{"id":"CVE-2026-92933","aliases":["GHSA-r273-hxvj-fxhp"],"summary":"vm2: util.getCallSites() bypasses GHSA-v27g-jcqj-v8rw host-frame redaction, leaks host call stack","details":"### Summary\n\nNodeVM exposes the host `util` module to the sandbox through an unfiltered shallow copy (`Object.assign({}, util)`). On Node.js >= 22.9 this hands sandboxed code `util.getCallSites()`, a programmatic stack-introspection API that returns the host process's full call stack — absolute file paths, function names, and line numbers — including vm2 bridge internals and the embedding application's entrypoint. This bypasses the host-frame redaction established in GHSA-v27g-jcqj-v8rw, which only covers the `Error.prepareStackTrace` channel.\n\n### Details\n\n- Root cause — `defaultBuiltinLoaderUtil` copies every static member of the host `util` module and wraps the copy in `vm.readonly()` without filtering any member, so newly added Node APIs land in the sandbox automatically:\n  https://github.com/patriksimek/vm2/blob/7a1f5100b96f48d34e0fe104ab37c0acc5944f92/lib/builtin.js#L25-L38\n- Second equivalent channel — the deprecated `sys` builtin (an alias of host `util`) goes through the generic builtin loader `vm.readonly(hostRequire(key))`, which also carries `getCallSites`:\n  https://github.com/patriksimek/vm2/blob/7a1f5100b96f48d34e0fe104ab37c0acc5944f92/lib/builtin.js#L230\n- Bypassed protection — GHSA-v27g's redaction (`isHostFrameFileName` + `applyCallSiteGetters`) rewrites host-frame metadata getters to `null` only when the *sandbox realm* formats an error stack:\n  https://github.com/patriksimek/vm2/blob/7a1f5100b96f48d34e0fe104ab37c0acc5944f92/lib/setup-sandbox.js#L818-L870\n\n`util.getCallSites()` produces its data host-side and never passes through that formatter, so frames such as `lib/bridge.js @apply` (the bridge apply trap), `lib/nodevm.js @run`, the embedder's own entry file, and `node:internal/*` frames reach the sandbox verbatim as data properties (`scriptName`, `functionName`, `lineNumber`, `columnNumber`, `scriptId`). A repository-wide grep (source, docs/ATTACKS.md, CHANGELOG, tests) shows no occurrence of `getCallSites`; the member was never considered.\n\n### PoC\n\nPrerequisites: Node.js >= 22.9 (verified on v22.23.1); run `npm ci --no-audit --no-fund` at the repository root.\n\nOne-line reproducer (prints `/workspace/repo/lib/bridge.js`, i.e. a vm2-internal host path):\n\n    node -e \"const {NodeVM}=require('/workspace/repo'); console.log(new NodeVM({require:{builtin:['util']}}).run(\\\"module.exports = require('util').getCallSites(4)[0].scriptName\\\"))\"\n\nObserved frames inside the sandbox, with both `require: { builtin: ['util'] }` and `require: { builtin: ['*'] }`:\n\n    /workspace/repo/lib/bridge.js @apply:1664\n    vm.js @:5\n    /workspace/repo/lib/bridge.js @apply:1664\n    /workspace/repo/lib/nodevm.js @run:563\n    /workspace/out/<embedder entrypoint>.js @main:29\n    node:internal/modules/cjs/loader @:1781\n    node:internal/modules/cjs/loader @:1913\n    ... (8 node:internal/* frames in total)\n\n### Impact\n\nInformation disclosure. Any NodeVM configuration that allows the `util` (or `sys`) builtin — including the wildcard `builtin: ['*']`, both typical configurations from the README — lets untrusted sandboxed code programmatically read the host call stack: the vm2 installation path, the embedding application's file layout and entrypoint, and internal function names and line numbers. This is the same information category redacted by GHSA-v27g-jcqj-v8rw (Defense Invariant #5 in docs/ATTACKS.md) and breaks defense-in-depth assumptions of embedders that rely on host frames being invisible to the sandbox. The API returns only strings/numbers (no host object references); no escalation to code execution was identified.\n\nSuggested fix: filter members in `defaultBuiltinLoaderUtil` (allowlist, or at minimum drop `getCallSites`), apply the same treatment to the generic loader path used by `sys`, and extend the GHSA-v27g regression tests to cover programmatic stack-introspection APIs.","categories":["Libraries & packages"],"product":"vm2","vendor":"patriksimek","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r273-hxvj-fxhp","source_modified_at":"2026-10-05T22:37:41Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2"},"range":"<= 3.11.7"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-92933","source_modified_at":"2026-09-19T02:27:07.171Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"vm2","vendor":"patriksimek","versions":[{"version":"0","status":"affected","versionType":"semver","lessThan":"3.11.8"},{"version":"3.11.8","status":"unaffected","versionType":"semver"}],"defaultStatus":"unaffected"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r273-hxvj-fxhp","source_modified_at":"2026-10-05T22:45:06.581201369Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2","purl":"pkg:npm/vm2"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"3.11.8"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r273-hxvj-fxhp","source_modified_at":"2026-10-05T22:37:41Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2"},"version":"3.11.8"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-92933","source_modified_at":"2026-09-19T02:27:07.171Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vm2","ecosystem":null},"version":"3.11.8","basis":"first unaffected version stated in the CVE record"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-r273-hxvj-fxhp","source_modified_at":"2026-10-05T22:45:06.581201369Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2","purl":"pkg:npm/vm2"},"version":"3.11.8"}],"cvss":6.9,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00372,"percentile":0.29976,"score_date":"2026-10-23"},"published_at":"2026-09-17T13:45:59.246Z","modified_at":"2026-10-05T22:45:06.581201369Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-r273-hxvj-fxhp","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-05T22:37:41Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-92933","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-19T02:27:07.171Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-r273-hxvj-fxhp","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-05T22:45:06.581201369Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-92933","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-r273-hxvj-fxhp","tags":["exploit"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-92933","source":"GitHub Advisory Database"},{"url":"https://github.com/patriksimek/vm2/commit/e10bd2f539ab1a90c2d37466e6aae740d4a1ce2a","source":"GitHub Advisory Database"},{"url":"https://github.com/patriksimek/vm2/releases/tag/v3.11.8","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://www.vulncheck.com/advisories/vm2-before-3.11.8-information-disclosure-via-util-getcallsites","tags":["third-party-advisory"]},{"url":"https://github.com/advisories/GHSA-r273-hxvj-fxhp","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"poc","automatable":"yes","technical_impact":"partial","assessed_at":"2026-09-19T02:26:35.918711Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-05T22:45:06.581201369Z","content_hash":"d4c812b59ae734744c63fa0645d9c8f114f6ed7c77178b9dec02dda92f2e552f"}}
