CVE-2024-22020 Code injection in Node
Attackers can bypass network import restrictions in Node.js by embedding non-network imports in data URLs, leading to arbitrary code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-22020?
CVE-2024-22020 is a medium-severity code injection vulnerability in NodeJS Node, published on 9 Jul 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
A security flaw in Node.js allows a bypass of network import restrictions. By embedding non-network imports in data URLs, an attacker can execute arbitrary code, compromising system security. Verified on various platforms, the vulnerability is mitigated by forbidding data URLs in network imports. Exploiting this flaw can violate network import security, posing a risk to developers and servers.
Weakness: CWE-94
Which versions are affected by CVE-2024-22020?
2 open source packages ship an affected version, including node and node-min.
| Package | Affected | Fixed in |
|---|---|---|
node Bitnami | All versions | 18.20.4, 20.15.1, 22.4.1 |
node-min Bitnami | All versions | 18.20.5, 20.18.1, 22.12.0 |
How do I fix CVE-2024-22020?
Upgrade node to a fixed version for your release line: 18.20.4, 20.15.1 or 22.4.1.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2024-22020 being exploited?
There is no known exploitation of CVE-2024-22020 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2024-22020, AZL-43195, AZL-43216, BELL-CVE-2024-22020, BIT-node-2024-22020, BIT-node-min-2024-22020 and 7 more.