CVE-2021-21297 Prototype Pollution in Node-Red

High 7.7 Published Updated

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.

Weakness: CWE-915, CWE-1321

Which versions are affected by CVE-2021-21297?

2 open source packages ship an affected version, including @node-red/runtime. It affects 1 product.

PackageAffectedFixed in
@node-red/runtime npmAll versions1.2.8
@node-red/runtime npmAll versions1.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.

Sources

Also known as GHSA-xp9c-82x8-7f67.

Is CVE-2021-21297 in your software?

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

Check your SBOMs for free