CVE-2021-21413
Misuse of `Reference` and other transferable APIs may lead to access to nodejs isolate
Check your servers for CVE-2021-21413
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-21413 affects isolated-vm, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N
- Attack vector
- adjacent: the attacker has to be on the same local network or link
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality high, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.72%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 55.1% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-913 Improper Control of Dynamically-Managed Code Resources
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| isolated-vm |
affected < 4.0.0
|
Is my server affected?
Find the installed version of isolated-vm and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i isolated-vm
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-21413 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-21413RHEL, Rocky, Alma, Fedora
rpm -q isolated-vm
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-21413Alpine
apk list --installed | grep -i isolated-vmWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-21413
trivy image --scanners vuln IMAGE | grep CVE-2021-21413
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/laverdet/isolated-vm/commit/2646e6c1558bac66285daeab54c7d490ed332b15 github.com
- https://github.com/laverdet/isolated-vm/commit/27151bfecc260e96714443613880e3b2e6596704 github.com
- https://github.com/laverdet/isolated-vm/blob/main/CHANGELOG.md#v400 github.com
Source: the record CVE-2021-21413 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse