# CVE-2021-21413: Misuse of \`Reference\` and other transferable APIs may lead to access to nodejs isolate

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.0
- **CVSS:** 8.0 (v3.1, CNA) `CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.72% (percentile 50, 2026-11-28)
- **CWE:** CWE-913
- **Aliases:** GHSA-mmhj-4w6j-76h7
- **Published:** 2021-03-30T22:25:14.000Z
- **Modified:** 2026-07-08T06:29:10.244Z

## Who should check

- Projects that depend on npm package isolated-vm (\< 4.0.0)
- Anyone running laverdet isolated-vm \< 4.0.0

## Description

isolated-vm is a library for nodejs which gives you access to v8's Isolate interface. Versions of isolated-vm before v4.0.0 have API pitfalls which may make it easy for implementers to expose supposed secure isolates to the permissions of the main nodejs isolate. Reference objects allow access to the underlying reference's full prototype chain. In an environment where the implementer has exposed a Reference instance to an attacker they would be able to use it to acquire a Reference to the nodejs context's Function object. Similar application-specific attacks could be possible by modifying the local prototype of other API objects. Access to NativeModule objects could allow an attacker to load and run native code from anywhere on the filesystem. If combined with, for example, a file upload API this would allow for arbitrary code execution. This is addressed in v4.0.0 through a series of related changes.

## Affected and fixed versions

- npm `isolated-vm`: affected \< 4.0.0; fixed 4.0.0 (osv)
- laverdet isolated-vm: \< 4.0.0 (cvelist)

## Mitigation

- Upgrade isolated-vm to 4.0.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-21413. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-21413.md
Affected: isolated-vm < 4.0.0
Fixed in: 4.0.0

Steps:
1. Search this machine and project for isolated-vm (npm), laverdet isolated-vm: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-21413 being exploited?

There is no confirmed exploitation: CVE-2021-21413 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.72% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-21413?

High: CVSS 8.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2021-21413?

isolated-vm \< 4.0.0.

### Is there a fix for CVE-2021-21413?

Yes. Fixed in 4.0.0. Upgrade isolated-vm to 4.0.0 or later.

### How do I check if I'm affected by CVE-2021-21413?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/laverdet/isolated-vm/security/advisories/GHSA-mmhj-4w6j-76h7>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-21413>
- patch: <https://github.com/laverdet/isolated-vm/commit/2646e6c1558bac66285daeab54c7d490ed332b15>
- patch: <https://github.com/laverdet/isolated-vm/commit/27151bfecc260e96714443613880e3b2e6596704>
- other: <https://github.com/laverdet/isolated-vm/blob/main/CHANGELOG.md#v400>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-21413>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-mmhj-4w6j-76h7> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-21413> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-21413>
