{"id":"CVE-2026-25641","published":"2026-02-06T19:50:11Z","modified":"2026-02-06T20:20:03Z","title":"SandboxJS has a sandbox escape via TOCTOU bug on keys in property accesses","vendor":"nyariv","product":"SandboxJS","tier":"tail","description":{"text":"SandboxJS is a JavaScript sandboxing library. Prior to 0.8.29, there is a sandbox escape vulnerability due to a mismatch between the key on which the validation is performed and the key used for accessing properties. Even though the key used in property accesses is annotated as string, this is never enforced. So, attackers can pass malicious objects that coerce to different string values when used, e.g., one for the time the key is sanitized using hasOwnProperty(key) and a different one for when the key is used for the actual property access. This vulnerability is fixed in 0.8.29.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00521,"percentile":0.4517,"provenance":"source"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"references":[{"url":"https://github.com/nyariv/SandboxJS/security/advisories/GHSA-7x3h-rm86-3342","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/nyariv/SandboxJS/commit/67cb186c41c78c51464f70405504e8ef0a6e43c3","tags":["x_refsource_MISC"]},{"url":"https://github.com/nyariv/SandboxJS/blob/6103d7147c4666fe48cfda58a4d5f37005b43754/src/executor.ts#L304-L304","tags":["x_refsource_MISC"]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":9.03},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"nyariv","affectedVersions":[{"vendor":"nyariv","product":"SandboxJS","versions":["< 0.8.29"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-02-06T20:19:59.166079Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@nyariv/sandboxjs","vulnerableRanges":["<0.8.29"],"patched":["0.8.29"],"from":["GHSA-7x3h-rm86-3342"],"provenance":"source"}],"summary":{"text":"The SandboxJS library (by nyariv) has a time-of-check/time-of-use flaw in its property-access handling: the key validated with hasOwnProperty is not guaranteed to be the same key used for the actual property access, because the key is never enforced to be a string. An attacker who can supply a crafted object whose string coercion returns different values at check time and at access time can escape the sandbox, which is possible over the network without authentication or user interaction, and the flaw is fixed in version 0.8.29.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:57:34Z"},"euvd":{"id":"EUVD-2026-5589","exploited":false,"provenance":"source"}}