CVE-2024-21892 Privilege escalation in Node
Unprivileged users can inject code that inherits elevated privileges due to incorrect capability handling in Node.js on Linux.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-21892?
CVE-2024-21892 is a high-severity vulnerability in Nodejs Node.js, published on 20 Feb 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
On Linux, Node.js ignores certain environment variables if those may have been set by an unprivileged user while the process is running with elevated privileges with the only exception of CAP_NET_BIND_SERVICE. Due to a bug in the implementation of this exception, Node.js incorrectly applies this exception even when certain other capabilities have been set. This allows unprivileged users to inject code that inherits the process's elevated privileges.
Which versions are affected by CVE-2024-21892?
2 open source packages ship an affected version, including node and node-min. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
node Bitnami | All versions | 18.19.1, 20.11.1, 21.6.2 |
node-min Bitnami | All versions | 18.19.1, 20.11.1, 21.6.2 |
Products include Nodejs Node.js.
How do I fix CVE-2024-21892?
Upgrade node to a fixed version for your release line: 18.19.1, 20.11.1 or 21.6.2.
Is CVE-2024-21892 being exploited?
There is no known exploitation of CVE-2024-21892 in the wild and no public exploit code.
Other vulnerabilities in Nodejs Node.js
Sources
Also known as AZL-34460, AZL-35052, BELL-CVE-2024-21892, BIT-node-2024-21892, BIT-node-min-2024-21892, CLEANSTART-2026-PN59834 and 2 more.