vm2 before 3.11.7 Timeout Bypass via FinalizationRegistry
vm2 before 3.11.7 (affected versions <= 3.11.6) does not enforce the VM({ timeout }) option on code executed outside the synchronous VM#run() call. The timeout only wraps the single call to _runScript() via doWithTimeout() in lib/vm.js, and FinalizationRegistry and WeakRef are exposed to sandboxed code unmodified (they are not among the hardened globals in lib/setup-sandbox.js). Sandboxed code can register a FinalizationRegistry cleanup callback against an object and then drop the only strong reference to it; vm.run() returns within the configured timeout, but when the V8 garbage collector later reclaims the object it invokes the sandboxed cleanup callback outside any vm2 timeout accounting. A busy loop in that callback blocks the host event loop for an unbounded period, resulting in denial of service. The time of invocation depends on the garbage collector (e.g. under memory pressure or with --expose-gc).
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-92942
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 03:52 UTC · Revision 1
Source evidence
vm2 before 3.11.7 Timeout Bypass via FinalizationRegistry
core-osv · Original sourcePublished 17 Sept 2026, 13:46 UTC
vm2 before 3.11.7 (affected versions <= 3.11.6) does not enforce the VM({ timeout }) option on code executed outside the synchronous VM#run() call. The timeout only wraps the single call to _runScript() via doWithTimeout() in lib/vm.js, and FinalizationRegistry and WeakRef are exposed to sandboxed code unmodified (they are not among the hardened globals in lib/setup-sandbox.js). Sandboxed code can register a FinalizationRegistry cleanup callback against an object and then drop the only strong reference to it; vm.run() returns within the configured timeout, but when the V8 garbage collector later reclaims the object it invokes the sandboxed cleanup callback outside any vm2 timeout accounting. A busy loop in that callback blocks the host event loop for an unbounded period, resulting in denial of service. The time of invocation depends on the garbage collector (e.g. under memory pressure or with --expose-gc).
osv:CVE-2026-92942
Complete source record
{
"id": "8fcb7176cae826439cde8aa9ec30bfe5183c50c88618b6b0f1049ffe1277203a",
"url": "https://osv.dev/vulnerability/CVE-2026-92942",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "vm2 before 3.11.7 Timeout Bypass via FinalizationRegistry",
"summary": "vm2 before 3.11.7 (affected versions <= 3.11.6) does not enforce the VM({ timeout }) option on code executed outside the synchronous VM#run() call. The timeout only wraps the single call to _runScript() via doWithTimeout() in lib/vm.js, and FinalizationRegistry and WeakRef are exposed to sandboxed code unmodified (they are not among the hardened globals in lib/setup-sandbox.js). Sandboxed code can register a FinalizationRegistry cleanup callback against an object and then drop the only strong reference to it; vm.run() returns within the configured timeout, but when the V8 garbage collector later reclaims the object it invokes the sandboxed cleanup callback outside any vm2 timeout accounting. A busy loop in that callback blocks the host event loop for an unbounded period, resulting in denial of service. The time of invocation depends on the garbage collector (e.g. under memory pressure or with --expose-gc).",
"evidence": "osv:CVE-2026-92942",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-92942",
"aliases": [
"CVE-2026-92942",
"GHSA-r4fx-v8hh-22mv"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/patriksimek/vm2",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "0c5b63a228c0af88d4a0d364ab0b90df278d710e"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "3.11.7"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
}
],
"versions": [
"3.11.6",
"v3.11.5",
"v3.11.4",
"v3.11.3",
"v3.11.2",
"v3.11.1",
"v3.11.0",
"v3.10.5",
"v3.10.4",
"v3.10.3",
"v3.10.2",
"v3.10.1",
"v3.10.0",
"3.9.19",
"3.9.18",
"3.9.17",
"3.9.16",
"3.9.15",
"3.9.14",
"3.9.13",
"3.9.12",
"3.9.11",
"3.9.10",
"3.9.9",
"3.9.8",
"3.9.7",
"3.9.6",
"3.9.5",
"3.9.4",
"3.9.3",
"v3.9.2",
"v3.9.1",
"v3.9.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-92942.json"
}
}
],
"modified": "2026-10-28T02:30:42.153140488Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/92xxx/CVE-2026-92942.json",
"https://github.com/patriksimek/vm2/security/advisories/GHSA-r4fx-v8hh-22mv",
"https://nvd.nist.gov/vuln/detail/CVE-2026-92942",
"https://www.vulncheck.com/advisories/vm2-before-3.11.7-timeout-bypass-via-finalizationregistry"
],
"provider_metadata": {
"cwe_ids": [
"CWE-400"
],
"cna_assigner": "VulnCheck",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/92xxx/CVE-2026-92942.json"
}
},
"related_cves": [
{
"value": "CVE-2026-92942",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510006,
"published_at": "2026-09-17T13:46:05.537+00:00"
}