---
id: CVE-2026-93604
title: >-
  vm2 through 3.12.0 exposes Node.js's crypto.setFips() function to untrusted
  guest code when an embedder explicitly allowlists the crypto builtin for a
  NodeVM (require.builtin: ['crypto'])
summary: >-
  vm2 through 3.12.0 exposes Node.js's crypto.setFips() function to untrusted
  guest code when an embedder explicitly allowlists the crypto builtin for a
  NodeVM (require.builtin: ['crypto']). The builtin sanitizer
  (sanitizeCryptoModule in l…
severity: high
cvss: 7.2
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L'
cwe:
  - CWE-284
vendor: patriksimek
product: vm2
affected:
  - vm2 < 3.12.1
published: '2026-09-18'
updated: '2026-09-18'
sourceUpdated: '2026-09-18T14:19:12.287'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-93604'
references:
  - url: 'https://github.com/patriksimek/vm2/security/advisories/GHSA-x3v6-43hc-82mc'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/vm2-3.11.8-sandbox-escape-via-crypto-setfips
    label: disclosure@vulncheck.com
  - url: 'https://github.com/patriksimek/vm2/security/advisories/GHSA-x3v6-43hc-82mc'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-09-18T13:54:54.931395Z'
ingestedAt: '2026-09-18T13:41:41.661Z'
epss: 0.00252
epssPercentile: 0.1693
---

## Overview

vm2 through 3.12.0 exposes Node.js's crypto.setFips() function to untrusted guest code when an embedder explicitly allowlists the crypto builtin for a NodeVM (require.builtin: ['crypto']). The builtin sanitizer (sanitizeCryptoModule 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. Guest code can therefore call crypto.setFips() to change the FIPS mode of the entire host process; the modified mode is subsequently observed by trusted host code (crypto.getFips() changed from 0 to 1 in the reported test), crossing the NodeVM isolation boundary. Fixed in vm2 3.12.1.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
