CVE-2022-32212: Command Injection

Published Jul 8, 2022
·
Updated

A OS Command Injection vulnerability exists in Node.js versions <14.20.0, <16.20.0, <18.5.0 due to an insufficient IsAllowedHost check that can easily be bypassed because IsIPAddress does not properly check if an IP address is invalid before making DBS requests allowing rebinding attacks.

Other sources

A vulnerability was found in NodeJS, where the IsAllowedHost check can be easily bypassed because IsIPAddress does not properly check if an IP address is invalid or not. When an invalid IPv4 address is provided (for instance, 10.0.2.555 is provided), browsers (such as Firefox) will make DNS requests to the DNS server. This issue provides a vector for an attacker-controlled DNS server or a Man-in-the-middle attack (MITM) who can spoof DNS responses to perform a rebinding attack and then connect to the WebSocket debugger allowing for arbitrary code execution on the target system.

CVE-2022-32212

The IsAllowedHost check can easily be bypassed because IsIPAddress does not properly check if an IP address is invalid or not. When an invalid IPv4 address is provided (for instance 10.0.2.555 is provided), browsers (such as Firefox) will make DNS requests to the DNS server, providing a vector for an attacker-controlled DNS server or a MITM who can spoof DNS responses to perform a rebinding attack and hence connect to the WebSocket debugger, allowing for arbitrary code execution. This is a bypass of CVE-2021-22884.

More details will be available at CVE-2022-32212 after publication.

Thank you to Axel Chong for reporting this vulnerability.

Impacts:

All versions of the 18.x, 16.x, and 14.x releases lines.

https://nodejs.org/en/blog/vulnerability/july-2022-security-releases/

Red Hat

Node.js could allow a remote attacker to execute arbitrary code on the system, caused by the failure to properly check if an IP address is invalid or not by IsIPAddress. By controlling the victim's DNS server or spoofing its responses, an attacker could exploit this vulnerability to bypass the IsAllowedHost check and execute arbitrary code on the system.

IBM

Affected Software

20 affected componentsFixes available
redhat/nodejs<1:16.16.0-1.el9_0
1:16.16.0-1.el9_0
redhat/rh-nodejs14-nodejs<0:14.20.0-2.el7
0:14.20.0-2.el7
debian/nodejs<=10.24.0~dfsg-1~deb10u1
10.24.0~dfsg-1~deb10u312.22.12~dfsg-1~deb11u418.13.0+dfsg1-1
redhat/nodejs<14.20.0
14.20.0
redhat/nodejs<16.20.0
16.20.0
redhat/nodejs<18.5.0
18.5.0
IBM Cognos Controller<=11.0.0 - 11.0.1
Nodejs Node.js>=14.0.0<=14.14.0
Nodejs Node.js>=14.15.0<14.20.1
Nodejs Node.js>=16.0.0<=16.12.0
Nodejs Node.js>=16.13.0<16.17.1
Nodejs Node.js>=18.0.0<18.5.0
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Fedoraproject Fedora=35
Fedoraproject Fedora=36
Fedoraproject Fedora=37
Siemens Sinec Ins<1.0
Siemens Sinec Ins=1.0
Siemens Sinec Ins=1.0-sp1

Event History

Jul 8, 2022
CVE Published
12:00 AM
Data Sourced
via Red Hat·06:41 PM
DescriptionSeverityAffected Software
Jul 14, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-32212?

CVE-2022-32212 is an OS Command Injection vulnerability in Node.js versions <14.20.0 <16.20.0 <18.5.0.

2

How severe is CVE-2022-32212?

CVE-2022-32212 has a severity rating of 8.1 (High).

3

What software versions are affected by CVE-2022-32212?

Node.js versions <14.20.0, <16.20.0, and <18.5.0 are affected by CVE-2022-32212.

4

How can I fix CVE-2022-32212?

To fix CVE-2022-32212, update your Node.js installation to version 14.20.0 or later.

5

Where can I find more information about CVE-2022-32212?

You can find more information about CVE-2022-32212 on the Red Hat Security Advisory and Node.js official website.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203