CVE-2026-93604
Description
A flaw was found in vm2. Untrusted guest code can exploit this vulnerability when the crypto builtin is explicitly allowlisted for a NodeVM (Node.js Virtual Machine). By calling the crypto.setFips() function, an attacker can modify the FIPS (Federal Information Processing Standards) mode of the entire host process. This allows guest code to bypass the NodeVM isolation boundary, leading to a sandbox escape and potentially impacting the integrity of the host system.
Statement
A sandbox escape vulnerability was found in vm2, a Node.js library for running untrusted code in isolated sandboxes. In versions through 3.12.0, vm2 exposes Node.js's crypto.setFips() function to untrusted guest code when an embedder explicitly allowlists the crypto builtin for a NodeVM (by setting require.builtin: ['crypto']). The builtin sanitizer in lib/builtin.js replaces crypto.setEngine() but leaves crypto.setFips() callable, and the readonly wrapper used to expose the host module does not localize side effects of forwarded host functions. As a result, guest code can call crypto.setFips() to change the FIPS mode of the entire host process, crossing the NodeVM isolation boundary.
The modified FIPS mode is subsequently observed by trusted host code, violating vm2's fundamental security guarantee of isolating untrusted guest code from the host process. This issue affects Red Hat Developer Hub and Ansible Portal, which use vm2 for sandboxed code execution.
Mitigation
This issue is fixed in vm2 version 3.12.1. Red Hat will provide updated versions of Developer Hub and Ansible Portal that include the fixed library version.
Until updates are available, administrators can reduce the risk of sandbox escape attacks by implementing the following mitigations:
1. Review vm2 sandbox configurations to determine if the 'crypto' builtin is explicitly allowlisted for untrusted guest code (require.builtin: ['crypto']). If crypto access is not required for guest code functionality, remove it from the allowlist.
2. Restrict the sources from which untrusted code is accepted. Only allow code execution from authenticated, trusted users or verified sources. Implement code review processes for any scripts or plugins before they are executed in vm2 sandboxes.
3. Monitor for unexpected changes to the Node.js process FIPS mode. Log calls to crypto.getFips() before and after guest code execution to detect unauthorized FIPS mode modifications.
4. In FIPS-required environments, consider running vm2 sandboxes in separate isolated processes rather than in the same process as critical application components. Process-level isolation provides an additional security boundary beyond vm2's VM isolation.
5. Implement additional access controls and audit logging for any systems that accept and execute user-provided code, scripts, or plugins.
6. Upgrade to vm2 3.12.1 or later as soon as updated packages are available from Red Hat.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.2 | N/A | 7.2 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | None | N/A | None |
| Scope | Changed | N/A | Changed |
| Confidentiality | None | N/A | None |
| Integrity Impact | Low | N/A | Low |
| Availability Impact | Low | N/A | Low |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L
cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L
Understanding the Weakness (CWE)
Other
Technical Impact: Reduce Maintainability
This issue makes it more difficult to maintain and/or port the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.