CVE-2024-21892 Privilege escalation in Node

High 7.5 Published Updated

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.

Weakness: CWE-94, CWE-269

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.

PackageAffectedFixed in
node BitnamiAll versions18.19.1, 20.11.1, 21.6.2
node-min BitnamiAll versions18.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.

All Nodejs Node.js vulnerabilities

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.

Is CVE-2024-21892 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free