# CVE-2026-25641: SandboxJS has a sandbox escape via TOCTOU bug on keys in property accesses

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.52%, higher than 45% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-05T21:33:04.000Z
- Modified: 2026-06-17T10:24:59.990Z
- Also known as: GHSA-7x3h-rm86-3342
- Weaknesses: CWE-74, CWE-367
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- nyariv SandboxJS: < 0.8.29; before 0.8.29
- @nyariv/sandboxjs (npm): before 0.8.29

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.0 Critical `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/nyariv/SandboxJS/security/advisories/GHSA-7x3h-rm86-3342> (exploit, vendor-advisory, web)
- <https://github.com/nyariv/SandboxJS/commit/67cb186c41c78c51464f70405504e8ef0a6e43c3> (patch, web)
- <https://github.com/nyariv/SandboxJS/blob/6103d7147c4666fe48cfda58a4d5f37005b43754/src/executor.ts#L304-L304> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25641> (advisory)
- <https://github.com/nyariv/SandboxJS> (package)

## Sources

- CVE List: [CVE-2026-25641](https://www.cve.org/CVERecord?id=CVE-2026-25641), CVE Terms of Use, modified 2026-02-06
- GitHub Advisory Database: [GHSA-7x3h-rm86-3342](https://github.com/advisories/GHSA-7x3h-rm86-3342), CC-BY-4.0, modified 2026-02-06
- NVD: [CVE-2026-25641](https://nvd.nist.gov/vuln/detail/CVE-2026-25641), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25641 · Whole record: https://cve.day/CVE-2026-25641.json · Rebuilt by cve.day 2026-11-25T22:59:13.573Z
