CVE-2021-21297 Prototype Pollution in Node-Red
Attackers can exploit prototype pollution in the admin API to modify runtime behavior, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-21297?
CVE-2021-21297 is a high-severity code injection vulnerability in node-red, published on 26 Feb 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Node-Red is a low-code programming for event-driven applications built using nodejs. Node-RED 1.2.7 and earlier contains a Prototype Pollution vulnerability in the admin API. A badly formed request can modify the prototype of the default JavaScript Object with the potential to affect the default behaviour of the Node-RED runtime. The vulnerability is patched in the 1.2.8 release. A workaround is to ensure only authorized users are able to access the editor url.
Which versions are affected by CVE-2021-21297?
2 open source packages ship an affected version, including @node-red/runtime. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@node-red/runtime npm | All versions | 1.2.8 |
@node-red/runtime npm | All versions | 1.2.8 |
Products include Nodered Node-Red.
How do I fix CVE-2021-21297?
Upgrade @node-red/runtime to 1.2.8 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2021-21297 being exploited?
There is no known exploitation of CVE-2021-21297 in the wild and no public exploit code.
Other vulnerabilities in node-red
Sources
Also known as GHSA-xp9c-82x8-7f67.