Skip to main content

CVE-2021-22959: HTTP Request Smuggling (CWE-444) in NodeJS Node

High
VulnerabilityCVE-2021-22959cvecve-2021-22959cwe-444
Published: Mon Nov 15 2021 (11/15/2021, 14:45:16 UTC)
Source: CVE
Vendor/Project: NodeJS
Product: Node

Description

The parser in accepts requests with a space (SP) right after the header name before the colon. This can lead to HTTP Request Smuggling (HRS) in llhttp < v2.1.4 and < v6.0.6.

AI-Powered Analysis

AILast updated: 06/25/2025, 14:32:35 UTC

Technical Analysis

CVE-2021-22959 is a vulnerability classified as HTTP Request Smuggling (CWE-444) affecting the NodeJS runtime environment, specifically the Node product versions 4.0 through 16.0. The root cause lies in the HTTP parser component (llhttp) used by NodeJS, which incorrectly accepts HTTP headers that contain a space character immediately following the header name and before the colon delimiter. This non-standard parsing behavior can be exploited to craft malicious HTTP requests that are interpreted differently by front-end proxies and back-end servers, leading to HTTP Request Smuggling attacks. Such attacks enable an adversary to bypass security controls, poison web caches, conduct cross-site scripting (XSS), hijack user sessions, or perform web cache deception. The vulnerability affects llhttp versions prior to 2.1.4 and 6.0.6, which are embedded in the affected NodeJS versions. No known exploits have been reported in the wild to date, and no official CVSS score has been assigned. However, the vulnerability is significant due to the widespread use of NodeJS in web application backends and microservices architectures. Exploitation requires an attacker to send specially crafted HTTP requests to vulnerable servers, potentially without authentication, depending on the deployment context. The vulnerability impacts the integrity and confidentiality of HTTP communications and can also affect availability if used to disrupt normal request processing.

Potential Impact

For European organizations, the impact of this vulnerability can be substantial, especially for those relying on NodeJS-based web services and APIs. HTTP Request Smuggling can lead to unauthorized access to sensitive data, session hijacking, and bypassing of security mechanisms such as web application firewalls (WAFs) and reverse proxies. This can compromise customer data, internal communications, and critical business operations. Industries such as finance, healthcare, e-commerce, and government services, which often use NodeJS for scalable web applications, are particularly at risk. Additionally, the ability to poison caches or manipulate request routing can degrade service availability and trustworthiness. Given the lack of known exploits, the threat is currently theoretical but should be treated proactively due to the ease of exploitation and potential for significant damage once weaponized.

Mitigation Recommendations

European organizations should prioritize upgrading NodeJS to versions that include patched llhttp components, specifically versions 2.1.4 or later for llhttp < v2.x and 6.0.6 or later for llhttp < v6.x. If immediate upgrading is not feasible, organizations should implement strict input validation and normalization at the web server or proxy level to reject HTTP headers with non-standard formatting, such as spaces after header names before colons. Deploying and tuning Web Application Firewalls (WAFs) to detect and block malformed HTTP requests indicative of request smuggling attempts is recommended. Network segmentation and strict access controls can limit exposure of vulnerable services. Additionally, monitoring HTTP traffic for anomalies and unusual request patterns can provide early detection. Organizations should also audit their NodeJS dependencies and container images to ensure no vulnerable versions are in use. Finally, educating development and operations teams about HTTP protocol compliance and secure coding practices can reduce future risks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
hackerone
Date Reserved
2021-01-06T00:00:00
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d983ac4522896dcbed46b

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

Last enriched: 6/25/2025, 2:32:35 PM

Last updated: 8/18/2025, 11:22:36 PM

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