OS Command Injection in Node.js

nodejs Updated 02 Oct 2025

Summary

14/07/2022
N/A
Yes i
High
8.1

CVE-2022-32212: A OS Command Injection vulnerability exists in Node.js versions. Affects nodejs across 2 version ranges.

< 0 >= c1da528bc25c9cc5a8240a7b4f136f5968f6e113, < c11b8215bd6388854efcc9302a7383c8c63b8127

No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Node.js is a popular JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to build scalable and efficient network applications. Node.js is widely used for server-side scripting and is known for its event-driven architecture and non-blocking I/O model. However, a vulnerability has been discovered in Node.js versions prior to 14.20.0, 16.20.0, and 18.5.0 that allows for OS command injection.

Vulnerability Detail

The OS command injection vulnerability in Node.js arises from an insufficient IsAllowedHost check, which can be bypassed due to the improper validation of IP addresses. This flaw enables attackers to perform rebinding attacks by making malicious requests to the database server. By exploiting this vulnerability, an attacker can execute arbitrary commands on the target system, potentially leading to unauthorized access, data leakage, or further compromise of the system.

How To Fix

To fix this vulnerability, it is recommended to update Node.js to version 14.20.0, 16.20.0, or 18.5.0 or later. These versions include the necessary fixes to properly validate IP addresses and prevent the bypass of the IsAllowedHost check. Updating to the latest version of Node.js ensures that the vulnerability is mitigated.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, if updating Node.js is not immediately feasible, it is recommended to implement network-level protections such as firewalls or network access control lists (ACLs) to restrict access to the affected Node.js instances. Additionally, it is advised to review and validate any user-supplied input to prevent the injection of malicious commands.

Conclusion

The OS command injection vulnerability in Node.js versions prior to 14.20.0, 16.20.0, and 18.5.0 poses a significant risk to the security and integrity of affected systems. It is crucial to update Node.js to the recommended versions or apply network-level protections until the update can be performed. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

This vulnerability allows attackers to execute arbitrary commands on the target system, potentially leading to unauthorized access, data leakage, or further compromise of the system.

Node.js versions prior to 14.20.0, 16.20.0, and 18.5.0 are affected by this vulnerability.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is important to promptly update Node.js to mitigate the risk.

Yes, the CVSS score for this vulnerability is 8.1, indicating a high severity level.

For more information about this vulnerability, you can refer to the CVE-2022-32212 entry in the National Vulnerability Database (NVD) or the provided source link.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

To fix this vulnerability, it is recommended to update Node.js to version 14.20.0, 16.20.0, or 18.5.0 or later. These versions include the necessary fixes to properly validate IP addresses and prevent the bypass of the IsAllowedHost check. Updating to the latest version of Node.js ensures that the vulnerability is mitigated.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback