Skip to main content

CVE-2022-43548: OS Command Injection (CWE-78) in NodeJS Node

High
VulnerabilityCVE-2022-43548cvecve-2022-43548cwe-78
Published: Mon Dec 05 2022 (12/05/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: NodeJS
Product: Node

Description

A OS Command Injection vulnerability exists in Node.js versions <14.21.1, <16.18.1, <18.12.1, <19.0.1 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.The fix for this issue in https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32212 was incomplete and this new CVE is to complete the fix.

AI-Powered Analysis

AILast updated: 06/22/2025, 15:06:27 UTC

Technical Analysis

CVE-2022-43548 is a high-severity OS Command Injection vulnerability affecting multiple versions of Node.js, specifically versions prior to 14.21.1, 16.18.1, 18.12.1, and 19.0.1. The root cause lies in an insufficient validation mechanism within the IsAllowedHost check, which is intended to restrict hostnames or IP addresses that can be used in certain Node.js operations. The vulnerability arises because the IsIPAddress function does not properly validate IP addresses before making DNS or database service (DBS) requests. This flaw allows attackers to bypass the intended restrictions through rebinding attacks, where maliciously crafted inputs can trick the system into executing arbitrary OS commands. This vulnerability is a continuation and completion of a previously identified issue (CVE-2022-32212), indicating that the original fix was incomplete. Exploiting this vulnerability can lead to remote code execution without requiring authentication or user interaction, as the attack vector is network-based. The CVSS v3.1 score of 8.1 reflects the high impact on confidentiality, integrity, and availability, with a network attack vector but requiring high attack complexity. No known exploits in the wild have been reported yet. Node.js is widely used in server-side applications, including web servers, APIs, and cloud services, making this vulnerability particularly critical for environments relying on vulnerable Node.js versions. The lack of a patch link in the provided data suggests that users should upgrade to the fixed versions mentioned or apply vendor-recommended mitigations once available.

Potential Impact

For European organizations, the impact of CVE-2022-43548 can be significant due to the widespread adoption of Node.js in enterprise web applications, cloud services, and IoT platforms. Successful exploitation can lead to full system compromise, data breaches, service disruptions, and lateral movement within networks. Confidentiality is at risk as attackers can execute arbitrary commands to exfiltrate sensitive data. Integrity can be compromised by altering application behavior or injecting malicious code. Availability may be affected through denial-of-service conditions caused by malicious commands. Sectors such as finance, healthcare, telecommunications, and government services in Europe, which often rely on Node.js for critical infrastructure and customer-facing applications, are particularly vulnerable. The vulnerability's network-based attack vector means that exposed services on the internet or internal networks can be targeted remotely without authentication, increasing the risk of widespread exploitation if not mitigated promptly. Additionally, the incomplete fix from the previous CVE indicates that some organizations may have a false sense of security if they only applied the earlier patch.

Mitigation Recommendations

1. Immediate upgrade to Node.js versions 14.21.1, 16.18.1, 18.12.1, 19.0.1 or later, which contain the complete fix for this vulnerability. 2. Conduct a thorough inventory of all Node.js instances across the organization, including development, testing, and production environments, to identify vulnerable versions. 3. Implement network-level controls such as firewall rules and intrusion detection systems to monitor and restrict unexpected DNS or DBS requests that could be exploited in rebinding attacks. 4. Employ application-layer input validation and sanitization to prevent injection of malicious hostnames or IP addresses. 5. Use runtime application self-protection (RASP) or endpoint detection and response (EDR) tools to detect anomalous command execution attempts. 6. Review and tighten permissions for services running Node.js to minimize the impact of potential command injection. 7. Monitor security advisories from Node.js and related vendors for patches or additional mitigation guidance. 8. Perform penetration testing and code reviews focusing on areas where host validation and command execution occur to identify residual risks. 9. Educate developers and system administrators about the risks of improper input validation and the importance of timely patching.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
hackerone
Date Reserved
2022-10-20T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d983bc4522896dcbee363

Added to database: 5/21/2025, 9:09:15 AM

Last enriched: 6/22/2025, 3:06:27 PM

Last updated: 8/13/2025, 11:12:01 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats