{"schema":"threatline.record/2","record":{"id":"CVE-2026-92936","aliases":["GHSA-x6m4-chr9-cg97"],"summary":"vm2 leaks absolute host filesystem paths to sandbox code via error stack formatting","details":"## Summary\n\nAttacker-controlled code can trigger a host-realm syntax error and read its stack through the vm2 bridge. Host-realm stack formatting bypasses the sandbox-side redaction, so the returned value exposes absolute paths from vm2, Node.js internals, and the embedding application. Default VM and NodeVM configurations are affected without requiring special options.\n\n## PoC\n\nA default-configured `VM` runs attacker-supplied code. Calling `eval` with deliberately malformed source makes the host-side source transformer throw a `SyntaxError`; reading `.stack` on the caught error exposes the host call stack to the sandbox.\n\n```js\nconst { VM } = require(\"vm2\");\nconsole.log(new VM().run(`\n  var s; try { eval(\"@@@ catch\") } catch (e) { s = e.stack }\n  s;\n`));\n```\n\n### Observed output\n\n```text\nSyntaxError: Unexpected character '@'\n    at makeNiceSyntaxError (.../lib/transformer.js:41:16)\n    at transformer (.../lib/transformer.js:116:8)\n    at Object.transformAndCheck (.../lib/vm.js:76:14)\n    at Object.apply (.../lib/setup-sandbox.js:2585:16)\n    at VM.run (.../lib/vm.js:529:16)\n```\n\nThe stack string returned to the sandbox contains absolute host paths for `lib/transformer.js`, `lib/vm.js`, `lib/setup-sandbox.js`, Node internals, and the embedding application's own source file.\n\n## Impact\n\nSandboxed code running under the default `new VM()` or `new NodeVM()` configuration can read absolute filesystem paths of the embedding application's source tree plus host function names, bypassing the host-path redaction added for GHSA-v27g-jcqj-v8rw. On a multi-tenant code-runner this discloses deployment layout such as `/home/app/...` or `/var/task/...`, useful for fingerprinting and for chaining into further attacks. The bridge forwards `.stack` reads to the host-realm formatter (`lib/bridge.js:1482`), so the sandbox-side stack redaction never runs; the leak does not require special configuration and persists when string eval is disabled, because the host-side transformer throws before eval is handled. Information disclosure only, no code execution.","categories":["Libraries & packages"],"product":"vm2","vendor":"patriksimek","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-x6m4-chr9-cg97","source_modified_at":"2026-10-05T22:35:34Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2"},"range":">= 3.11.0, <= 3.11.6"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-92936","source_modified_at":"2026-09-17T15:52:18.255Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"vm2","vendor":"patriksimek","versions":[{"version":"3.11.0","status":"affected","versionType":"semver","lessThan":"3.11.7"},{"version":"3.11.7","status":"unaffected","versionType":"semver"}],"defaultStatus":"unaffected"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-x6m4-chr9-cg97","source_modified_at":"2026-10-05T22:45:06.434355748Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2","purl":"pkg:npm/vm2"},"ranges":[{"events":[{"introduced":"3.11.0"},{"fixed":"3.11.7"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-x6m4-chr9-cg97","source_modified_at":"2026-10-05T22:35:34Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2"},"version":"3.11.7"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-92936","source_modified_at":"2026-09-17T15:52:18.255Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vm2","ecosystem":null},"version":"3.11.7","basis":"first unaffected version stated in the CVE record"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-x6m4-chr9-cg97","source_modified_at":"2026-10-05T22:45:06.434355748Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vm2","purl":"pkg:npm/vm2"},"version":"3.11.7"}],"cvss":6.9,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00455,"percentile":0.38516,"score_date":"2026-10-23"},"published_at":"2026-09-17T13:46:01.524Z","modified_at":"2026-10-05T22:45:06.434355748Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-x6m4-chr9-cg97","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-05T22:35:34Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-92936","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-09-17T15:52:18.255Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-x6m4-chr9-cg97","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-05T22:45:06.434355748Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-92936","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-x6m4-chr9-cg97","tags":["exploit"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-92936","source":"GitHub Advisory Database"},{"url":"https://github.com/patriksimek/vm2/commit/5d5ba5343af571c688a3a81cefad2de25b94180a","source":"GitHub Advisory Database"},{"url":"https://github.com/patriksimek/vm2/releases/tag/v3.11.7","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://www.vulncheck.com/advisories/vm2-3.11.0-before-3.11.7-information-disclosure-via-error-stack","tags":["third-party-advisory"]},{"url":"https://github.com/advisories/GHSA-x6m4-chr9-cg97","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-17T15:50:38.454592Z"},"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.434355748Z","content_hash":"6d406fe7f64b89ca8f3d6fa2105012eb86d4a0c082c8f84d62f5ea97a57fd706"}}
