CVE-2026-25586
Prototype Pollution via Sandbox Escape in SandboxJS
Publication date: 2026-02-06
Last updated on: 2026-02-18
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| nyariv | sandboxjs | to 0.8.29 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-74 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
[{'type': 'paragraph', 'content': "CVE-2026-25586 is a critical vulnerability in the SandboxJS JavaScript sandboxing library versions prior to 0.8.29. The issue arises because the sandbox's prototype whitelist enforcement relies on the hasOwnProperty method to check property access. If a sandboxed object shadows hasOwnProperty to always return true, this enforcement is bypassed."}, {'type': 'paragraph', 'content': "This bypass allows direct access to __proto__ and other normally blocked prototype properties, enabling an attacker to pollute the host's Object.prototype. This pollution can persist across different sandboxes, leading to cross-sandbox impact."}, {'type': 'paragraph', 'content': 'The vulnerability can be exploited without any special privileges or user interaction and has been demonstrated to allow actions such as setting arbitrary flags on all objects, causing denial of service by overriding core methods, and even remote code execution by injecting malicious commands executed by host system gadgets.'}] [1]
How can this vulnerability impact me? :
[{'type': 'paragraph', 'content': 'This vulnerability can have severe impacts including complete compromise of the sandbox environment and the host system.'}, {'type': 'list_item', 'content': 'Bypassing sandbox restrictions to escape the sandbox.'}, {'type': 'list_item', 'content': "Polluting the host's Object.prototype, which affects all JavaScript objects and can cause persistent cross-sandbox effects."}, {'type': 'list_item', 'content': 'Enabling denial of service by overriding critical object methods to throw errors.'}, {'type': 'list_item', 'content': 'Allowing remote code execution by injecting malicious commands executed on the host system.'}, {'type': 'paragraph', 'content': 'The vulnerability has a network attack vector, low attack complexity, requires no privileges or user interaction, and results in high confidentiality, integrity, and availability impacts.'}] [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by checking if the SandboxJS version in use is prior to 0.8.29, as versions before this are vulnerable.
Additionally, detection can involve testing whether sandboxed objects shadow the hasOwnProperty method to bypass prototype whitelist enforcement.
Proofs of concept demonstrate that attempts to access or modify __proto__ or other prototype properties from within the sandbox indicate the vulnerability.
While no specific commands are provided in the resources, you can check the installed package version using npm commands such as:
- npm list @nyariv/sandboxjs
- npm ls @nyariv/sandboxjs
To test for prototype pollution, you might run sandboxed code snippets attempting to shadow hasOwnProperty and access __proto__, observing if the sandbox blocks or allows such access.
What immediate steps should I take to mitigate this vulnerability?
The immediate and recommended mitigation is to upgrade the SandboxJS package to version 0.8.29 or later, where this vulnerability is fixed.
Avoid using vulnerable versions (prior to 0.8.29) in production environments.
Review sandbox configurations to ensure that prototype access checks are not bypassable by shadowing hasOwnProperty or other prototype methods.
Consider implementing additional runtime monitoring to detect unusual prototype mutations or pollution attempts.