CVE-2023-32002 Overview
CVE-2023-32002 is a policy bypass vulnerability in Node.js affecting the experimental policy mechanism. Attackers can use Module._load() to load modules outside of the constraints defined in policy.json, defeating the integrity and access controls the policy mechanism is designed to enforce. The flaw impacts all active release lines at the time of disclosure: 16.x, 18.x, and 20.x. The Node.js project notes that the policy mechanism was an experimental feature when this CVE was assigned. The issue is categorized under [CWE-288] (Authentication Bypass Using an Alternate Path or Channel).
Critical Impact
An attacker who can influence module loading can bypass the policy.json controls and require arbitrary modules, undermining application integrity and confidentiality.
Affected Products
- Node.js 16.x release line
- Node.js 18.x release line
- Node.js 20.x release line
Discovery Timeline
- 2023-08-21 - CVE-2023-32002 published to NVD
- 2025-07-02 - Last updated in NVD database
Technical Details for CVE-2023-32002
Vulnerability Analysis
The Node.js policy mechanism allows developers to restrict which modules an application may load, enforced through a policy.json manifest. The mechanism is intended to provide integrity checks and to limit require() calls to an approved set of modules.
CVE-2023-32002 demonstrates that the internal Module._load() function does not consistently apply policy checks performed at the higher-level require() boundary. By calling Module._load() directly, code running inside a policy-restricted context can resolve and load modules that the active policy.json would otherwise block.
The practical effect is a complete bypass of the policy boundary. Once an attacker reaches arbitrary module loading, they can pull in modules with filesystem, network, or child process capabilities and execute attacker-controlled logic within the Node.js process.
Root Cause
The root cause is inconsistent enforcement of the policy mechanism across module-loading entry points. Policy validation is applied at require() but not enforced for the internal Module._load() path, leaving an alternate channel that reaches the same module resolution logic without the policy gate. This pattern aligns with [CWE-288], where an alternate path bypasses the authentication or authorization control.
Attack Vector
Exploitation requires the attacker to execute or influence JavaScript inside a Node.js process that relies on the experimental policy mechanism for isolation. This commonly occurs when policies are used to constrain third-party packages or untrusted code. The attacker calls Module._load() with a module specifier that is not allowed by policy.json, and the module is resolved and executed without policy enforcement. No additional privileges or user interaction are required beyond the ability to run code within the constrained context.
For technical details and proof-of-concept context, see the HackerOne Report #1960870 and the NetApp Security Advisory NTAP-20230915-0009.
Detection Methods for CVE-2023-32002
Indicators of Compromise
- Node.js processes started with --experimental-policy that load modules not declared in the associated policy.json manifest.
- Runtime references to Module._load or require('module')._load in application or dependency code, especially in code paths that handle untrusted input.
- Unexpected child processes, outbound network connections, or filesystem writes from Node.js services that are supposed to be policy-constrained.
Detection Strategies
- Perform static analysis of application and dependency source for direct invocations of Module._load() or access to the internal module API.
- Inventory Node.js runtime versions across the fleet and flag any 16.x, 18.x, or 20.x installation below the patched releases that uses the experimental policy feature.
- Compare modules actually loaded at runtime against the resources declared in policy.json to identify divergence.
Monitoring Recommendations
- Capture Node.js process telemetry, including command-line flags, loaded modules, and spawned child processes, into a central analytics platform.
- Alert on Node.js services that begin executing unexpected modules or system binaries after a deployment that did not change policy.json.
- Track package and runtime version drift so vulnerable Node.js builds do not silently return to production.
How to Mitigate CVE-2023-32002
Immediate Actions Required
- Upgrade Node.js to a fixed release on the 16.x, 18.x, or 20.x line as published in the Node.js August 2023 security release.
- Treat the experimental policy mechanism as a defense-in-depth control rather than a security boundary for untrusted code.
- Review application code and dependencies for direct use of Module._load() and remove or sandbox those call sites.
Patch Information
The Node.js project addressed CVE-2023-32002 in the August 2023 security releases for the 16.x, 18.x, and 20.x lines. Downstream distributions tracked the fix in vendor advisories, including the NetApp Security Advisory NTAP-20230915-0009. Apply the latest patch release for the supported line in use and rebuild any container images that bundle the Node.js runtime.
Workarounds
- Run untrusted code in a separate process or container with operating-system-level isolation rather than relying solely on the experimental policy feature.
- Restrict filesystem, network, and child process capabilities of the Node.js process using OS controls such as seccomp, AppArmor, or container security profiles.
- Audit dependencies for use of internal Node.js APIs and pin versions that are known to be free of Module._load() misuse.
# Verify the installed Node.js version against fixed releases
node --version
# Example: upgrade via nvm to a patched 20.x release
nvm install 20.5.1
nvm use 20.5.1
# Re-run the application without --experimental-policy until isolation is validated
node app.js
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


