{"id":"GHSA-q3fm-4wcw-g57x","revision":null,"records":[{"revision":"1c4f1a7af210416180069a6ced0f8333","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-92962","aliases":[],"title":"vm2 before 3.11.4 Defense Invariant Violation via setup-sandbox.js","description":"vm2 is a sandbox for running untrusted JavaScript. In vm2 versions up to and including 3.11.3, the defaultSandboxPrepareStackTrace function in lib/setup-sandbox.js builds its output array using prototype-walking index assignment (lines[lines.length] = value) rather than a prototype-bypassing define-property primitive. Because this bridge-internal array is allocated in the sandbox realm, code inside the sandbox can install an accessor on Array.prototype for the relevant index; the accessor is then invoked whenever the sandbox reads error.stack (or otherwise triggers Error.prepareStackTrace), allowing sandbox code to observe and intercept each stack-trace line written by the bridge. The same pattern is used in the error-handling (catch) branch. The values written are formatted strings only, so the practical impact is limited to an information side channel and a violation of vm2's bridge-container defense invariant rather than a sandbox escape; the vendor rates the issue Low. The issue is fixed in vm2 3.11.4, which installs each entry as an own data property via Reflect.defineProperty.","state":0,"publishedAt":"2026-09-17T13:46:18.295+00:00","modifiedAt":"2026-09-17T15:40:44.491+00:00","affected":[{"ecosystem":"Vendor product","name":"vm2","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"patriksimek\",\n                    \"product\": \"vm2\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"packageURL\": \"pkg:npm/vm2\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\",\n                            \"lessThan\": \"3.11.4\"\n                        },\n                        {\n                            \"version\": \"3.11.4\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 4.0","vector":"CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":2.1,"severity":"LOW"}],"references":["https://github.com/patriksimek/vm2/security/advisories/GHSA-q3fm-4wcw-g57x","https://www.vulncheck.com/advisories/vm2-before-3.11.4-defense-invariant-violation-via-setup-sandbox-js"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-92962","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-92962","identifiers":["CVE-2026-92962"]},"retained":false,"historicalAffected":[]},{"revision":"ebc9587d1e974e3789bbb4ec3ff9fa9f","observedAt":"2026-11-11T17:05:32.08+00:00","statement":{"source":"euvd","id":"EUVD-2026-81612","aliases":["CVE-2026-92962","GHSA-2c9f-f88g-g76p"],"title":"vm2 is a sandbox for running untrusted JavaScript. In vm2 versions up to and including 3.11.3, the defaultSandboxPrepareStackTrace function in lib/setup-sandbox.js builds its output array using prototype-walking index assignment (lines[line…","description":"vm2 is a sandbox for running untrusted JavaScript. In vm2 versions up to and including 3.11.3, the defaultSandboxPrepareStackTrace function in lib/setup-sandbox.js builds its output array using prototype-walking index assignment (lines[lines.length] = value) rather than a prototype-bypassing define-property primitive. Because this bridge-internal array is allocated in the sandbox realm, code inside the sandbox can install an accessor on Array.prototype for the relevant index; the accessor is then invoked whenever the sandbox reads error.stack (or otherwise triggers Error.prepareStackTrace), allowing sandbox code to observe and intercept each stack-trace line written by the bridge. The same pattern is used in the error-handling (catch) branch. The values written are formatted strings only, so the practical impact is limited to an information side channel and a violation of vm2's bridge-container defense invariant rather than a sandbox escape; the vendor rates the issue Low. The issue is fixed in vm2 3.11.4, which installs each entry as an own data property via Reflect.defineProperty.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 4.0","vector":"CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":2.1,"severity":null}],"references":["https://github.com/patriksimek/vm2/security/advisories/GHSA-q3fm-4wcw-g57x","https://www.vulncheck.com/advisories/vm2-before-3.11.4-defense-invariant-violation-via-setup-sandbox-js"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-81612","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Sep 17, 2026, 1:46:18 PM","dateUpdated":"Sep 17, 2026, 3:40:44 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-81612","identifiers":["EUVD-2026-81612","CVE-2026-92962","GHSA-2c9f-f88g-g76p"]},"retained":false,"historicalAffected":[]},{"revision":"6e76e58599214cb9859e87d9c608f9b9","observedAt":"2026-10-25T16:19:28.255+00:00","statement":{"source":"nvd","id":"CVE-2026-92962","aliases":[],"title":"vm2 is a sandbox for running untrusted JavaScript. In vm2 versions up to and including 3.11.3, the defaultSandboxPrepareStackTrace function in lib/setup-sandbox.js builds its output array using prototype-walking index assignment (lines[line…","description":"vm2 is a sandbox for running untrusted JavaScript. In vm2 versions up to and including 3.11.3, the defaultSandboxPrepareStackTrace function in lib/setup-sandbox.js builds its output array using prototype-walking index assignment (lines[lines.length] = value) rather than a prototype-bypassing define-property primitive. Because this bridge-internal array is allocated in the sandbox realm, code inside the sandbox can install an accessor on Array.prototype for the relevant index; the accessor is then invoked whenever the sandbox reads error.stack (or otherwise triggers Error.prepareStackTrace), allowing sandbox code to observe and intercept each stack-trace line written by the bridge. The same pattern is used in the error-handling (catch) branch. The values written are formatted strings only, so the practical impact is limited to an information side channel and a violation of vm2's bridge-container defense invariant rather than a sandbox escape; the vendor rates the issue Low. The issue is fixed in vm2 3.11.4, which installs each entry as an own data property via Reflect.defineProperty.","state":0,"publishedAt":"2026-09-17T14:18:02.61+00:00","modifiedAt":"2026-09-17T16:18:34.94+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · disclosure@vulncheck.com · Secondary","vector":"CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","score":2.1,"severity":"LOW"}],"references":["https://github.com/patriksimek/vm2/security/advisories/GHSA-q3fm-4wcw-g57x","https://www.vulncheck.com/advisories/vm2-before-3.11.4-defense-invariant-violation-via-setup-sandbox-js"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-92962","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-693"],"productCriteria":[],"sourceDates":{"published":"2026-09-17T14:18:02.610","lastModified":"2026-09-17T16:18:34.940"},"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-92962","identifiers":["CVE-2026-92962"]},"retained":false,"historicalAffected":[]},{"revision":"a388d52661ca4107a41af1a5d21663ef","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-q3fm-4wcw-g57x","aliases":["CVE-2026-92962"],"title":"vm2 setup-sandbox.js violates Defense Invariant #11 in stack-trace formatter","description":"## Summary\n\n`defaultSandboxPrepareStackTrace` in `lib/setup-sandbox.js` (lines 605, 607) appends to a fresh sandbox-realm `lines = []` via `lines[lines.length] = value`. This is the exact invariant-violating pattern that GHSA-9qj6-qjgg-37qq (commit ca195f0, 2026-05-01) just patched in `neutralizeArraySpeciesBatch` and codified as Defense Invariant #11 (\"Bridge-internal containers must not invoke sandbox code\"). A sandbox-installed `Array.prototype[N]` setter fires during the bridge's safe-default stack-trace formatting and observes / intercepts each appended line.\n\n## Details\n\nThe post-9qj6 audit note in `docs/ATTACKS.md` (line 2111) states:\n\n> Equivalent pattern elsewhere in the bridge: audited; thisFromOtherArguments, otherFromThisArguments, and every other index-write site already use thisReflectDefineProperty or otherReflectDefineProperty. neutralizeArraySpeciesBatch was the lone outlier.\n\nThe audit is scoped to `lib/bridge.js`. `lib/setup-sandbox.js` was not covered. `defaultSandboxPrepareStackTrace` (added under post-#563 hardening for GHSA-v27g) constructs a sandbox-realm `[header]` array and appends each frame via the prototype-walking index assignment:\n\n```\n// lib/setup-sandbox.js, lines 601-610\nconst lines = [header];\nfor (let i = 0; i < callSites.length; i++) {\n    try {\n        lines[lines.length] = '    at ' + callSites[i];\n    } catch (e) {\n        lines[lines.length] = '    at <error formatting frame>';\n    }\n}\nreturn lines.join('\\n');\n```\n\nThis function runs every time sandbox code reads `error.stack` (or any path that triggers `Error.prepareStackTrace`). At the time it runs, user code has already had the opportunity to install a setter on `Array.prototype[N]`. Because `lines` starts at length 1, the first iteration writes index 1; if `lines[1]` has no own data property, V8 walks the prototype chain and invokes the sandbox-controlled setter.\n\nThe currently-assigned value is the string `'    at ' + callSites[i]` (the wrapped `CallSite` class's safe `toString()` returns `'CallSite {}'`), which limits the immediate impact to a side channel, not an RCE pivot. The concern is structural rather than exploit-today:\n\n- The just-codified Defense Invariant #11 explicitly requires that any list, set, or map allocated for the bridge's exclusive use must read and write through identity-stable, prototype-bypassing primitives. This site does not.\n- The `catch` branch at line 607 also uses the same pattern, so a sandbox getter that throws on `callSites[i]` access still routes its retry write through the prototype chain.\n- A future change that makes the appended slot value an object holding a host-realm reference (for example, an enriched frame record) would re-introduce the exact GHSA-9qj6 attack shape against this codepath.\n\nThe fix is mechanical and mirrors the GHSA-9qj6 patch: install entries via `localReflectDefineProperty` so each appended slot is an own data property and the prototype-chain setter is bypassed.\n\n```javascript\n// Suggested patch (sketch)\nlet linesLen = 1;\nfunction append(s) {\n    localReflectDefineProperty(lines, linesLen, {\n        __proto__: null,\n        value: s,\n        writable: true,\n        enumerable: true,\n        configurable: true,\n    });\n    linesLen++;\n}\nfor (let i = 0; i < callSites.length; i++) {\n    try {\n        append('    at ' + callSites[i]);\n    } catch (e) {\n        append('    at <error formatting frame>');\n    }\n}\n```\n\nThe same pattern at `callSiteGetters[callSiteGetters.length] = {...}` (line 649) runs only at sandbox setup, before user code can install setters, so it is safe today. Converting it for symmetry would be cheap and forward-compatible.\n\n## PoC\n\nvm2 v3.11.2, Node v24.\n\n```javascript\nconst { VM } = require('vm2');\nconst result = new VM().run(`\n    var observed = { setterFired: false, capturedValue: null, indexFired: null };\n    Object.defineProperty(Array.prototype, 1, {\n        configurable: true,\n        set(value) {\n            observed.setterFired = true;\n            observed.indexFired = 1;\n            observed.capturedValue =\n                typeof value === 'string' ? value.slice(0, 40) : typeof value;\n        },\n        get() { return undefined; }\n    });\n    var e = new Error('x');\n    e.stack;\n    observed;\n`);\nconsole.log(result);\n// {\n//   setterFired: true,\n//   capturedValue: '    at CallSite {}',\n//   indexFired: 1\n// }\n```\n\nSandbox code observed and intercepted the bridge-internal write to `lines[1]`. Repeating the PoC with the setter installed at multiple indices (0, 1, 2, ...) captures every frame the formatter would otherwise return.\n\n## Impact\n\nHardening / Defense Invariant #11 violation. No direct sandbox escape on the current codebase: the value passed to the setter is a primitive string after the wrapped `CallSite.toString()`, so attacker-controlled code does not gain a host-realm reference from the setter argument alone. The GHSA-9qj6 entry's \"Considered Attack Surfaces\" note states the audit covered `lib/bridge.js` index-write sites; this filing reports the equivalent pattern in `lib/setup-sandbox.js` so the invariant is uniform across the bridge boundary and future enrichments of the appended record cannot regress into the GHSA-9qj6 shape.","state":0,"publishedAt":"2026-05-29T17:38:33+00:00","modifiedAt":"2026-09-18T03:56:05.2528119+00:00","affected":[{"ecosystem":"npm","name":"vm2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.11.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/patriksimek/vm2/security/advisories/GHSA-q3fm-4wcw-g57x","https://github.com/patriksimek/vm2/commit/ad31adc1fc4a2c163f2f8c11ab4af206074528fd","https://github.com/patriksimek/vm2","https://github.com/patriksimek/vm2/releases/tag/v3.11.4"],"sourceUrl":"https://github.com/advisories/GHSA-q3fm-4wcw-g57x","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-q3fm-4wcw-g57x","identifiers":["GHSA-q3fm-4wcw-g57x","CVE-2026-92962"]},"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-13T14:58:44.3363234+00:00","complete":true,"records":1779,"lastAttemptAt":"2026-11-13T14:58:44.3363234+00:00","lastSuccessAt":"2026-11-13T14:58:44.5141359+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:58:44.5141368+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-d8fa82e95fdb59244e2f635e667ba17f0796ca0a4f1f4bb8cc31febcd660b76c-321382fc5730a00bef582c627181233f63f76828d1f8c684a35769006df72dd6","complete":true,"records":425393,"lastAttemptAt":"2026-11-13T14:56:59.0753591+00:00","lastSuccessAt":"2026-11-13T14:56:58.979484+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:56:59.0753591+00:00","snapshotPublishedAt":"2026-11-13T14:29:09+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-84ec3c3567f542ebaf00da1aff213189","complete":false,"records":13797,"lastAttemptAt":"2026-11-13T15:03:10.2302932+00:00","lastSuccessAt":"2026-11-13T15:03:10.2910787+00:00","error":null,"lastVerifiedAt":"2026-11-13T15:03:10.2910787+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"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-13T14:58:44.3363234+00:00","complete":true,"records":1123,"lastAttemptAt":"2026-11-13T14:58:44.3363234+00:00","lastSuccessAt":"2026-11-13T14:58:44.5149276+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:58:44.5149277+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-c4db44c2f8494656b34b99b9689fe3fd","complete":true,"records":13797,"lastAttemptAt":"2026-11-13T14:58:49.0732225+00:00","lastSuccessAt":"2026-11-13T14:58:49.069+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:58:49.069+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13850,"expectedIdentifiers":13850,"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-93e76d404e1aeb6a7e8902f5ffa06211fc86dea3b1958e297abb2668aa5e6e8c","complete":true,"records":9952,"lastAttemptAt":"2026-11-13T14:58:40.3714043+00:00","lastSuccessAt":"2026-11-12T23:19:15.5239119+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:58:40.3714043+00:00","snapshotPublishedAt":"2026-11-12T23:03:02+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-4d60731753a2f72e455d1086e7203d0ef10843936dcc1cf2b45135e2caa204b0","complete":true,"records":2012,"lastAttemptAt":"2026-11-13T14:56:59.1280107+00:00","lastSuccessAt":"2026-11-12T18:16:50.7862525+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:56:59.1280107+00:00","snapshotPublishedAt":"2026-11-12T17:48:11+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-b98055ddd8730ffa62c2a08d5fcf33dfdf9704c3bfb02936eddd878e2c44c283","complete":true,"records":3146,"lastAttemptAt":"2026-11-13T14:58:44.2985337+00:00","lastSuccessAt":"2026-11-13T14:58:44.1320252+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:58:44.2985337+00:00","snapshotPublishedAt":"2026-11-13T13:03:04+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-1c778759030c865168b5e9dee5772455ec2cc2e719ea7dfbebee29f18fbbe4ff","complete":true,"records":231771,"lastAttemptAt":"2026-11-13T14:58:40.2396052+00:00","lastSuccessAt":"2026-11-13T14:58:38.6112066+00:00","error":null,"lastVerifiedAt":"2026-11-13T14:58:40.2396052+00:00","snapshotPublishedAt":"2026-11-13T14:32:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}