CVE-2021-45459 Command Injection in node-windows

Critical 9.8 Published Updated

Attackers can execute arbitrary commands via the PID parameter in the node-windows library for Node.js.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-45459?

CVE-2021-45459 is a critical command injection vulnerability in n/a, published on 22 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

lib/cmd.js in the node-windows package before 1.0.0-beta.6 for Node.js allows command injection via the PID parameter.

Weakness: CWE-77

Which versions are affected by CVE-2021-45459?

2 open source packages ship an affected version, including node-windows. It affects 1 product.

PackageAffectedFixed in
node-windows npmAll versions1.0.0-beta.6
node-windows npmAll versions1.0.0-beta.6

Products include Node-Windows Project Node-Windows.

How do I fix CVE-2021-45459?

Upgrade node-windows to 1.0.0-beta.6 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2021-45459 being exploited?

There is no known exploitation of CVE-2021-45459 in the wild and no public exploit code.

Sources

Also known as GHSA-53xv-c2hx-5w6q.

Is CVE-2021-45459 in your software?

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

Check your SBOMs for free