Skip to main content

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

High
VulnerabilityCVE-2021-22960cvecve-2021-22960cwe-444
Published: Wed Nov 03 2021 (11/03/2021, 19:22:42 UTC)
Source: CVE
Vendor/Project: NodeJS
Product: Node

Description

The parse function in llhttp < 2.1.4 and < 6.0.6. ignores chunk extensions when parsing the body of chunked requests. This leads to HTTP Request Smuggling (HRS) under certain conditions.

AI-Powered Analysis

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

Technical Analysis

CVE-2021-22960 is a vulnerability classified as HTTP Request Smuggling (HRS) affecting the NodeJS runtime environment, specifically versions prior to 2.1.4 and 6.0.6 of the llhttp parser library used internally by NodeJS. The vulnerability arises because the parse function in llhttp incorrectly ignores chunk extensions when parsing the body of chunked HTTP requests. Chunked transfer encoding allows HTTP messages to be sent in a series of chunks, each with its own size and optional extensions. Proper parsing of these extensions is critical to correctly interpret the boundaries of each chunk. Due to this flaw, an attacker can craft specially formed HTTP requests that exploit the discrepancy in how front-end proxies or servers and the vulnerable NodeJS application parse the chunked request body. This discrepancy enables HTTP Request Smuggling, where an attacker can desynchronize the interpretation of HTTP requests between intermediaries and the backend server. The consequences include the ability to inject malicious requests, bypass security controls, poison web caches, conduct cross-site scripting (XSS), hijack user sessions, or perform web cache deception attacks. The vulnerability affects a wide range of NodeJS versions from 4.0 through 16.0, which are commonly used in web servers, APIs, and cloud-native applications. Although no known exploits have been observed in the wild to date, the nature of HTTP Request Smuggling vulnerabilities makes them particularly dangerous because they can be exploited remotely without authentication and often require only a single crafted HTTP request. The lack of a CVSS score suggests the vulnerability has not been fully scored, but the technical details indicate a significant security risk. No official patches or mitigation links are provided in the data, but upgrading to llhttp versions 2.1.4 or 6.0.6 and above is implied as a remediation step. Organizations using affected NodeJS versions in their web-facing infrastructure should consider this vulnerability critical to address due to the potential for serious downstream impacts on confidentiality, integrity, and availability of web services.

Potential Impact

For European organizations, the impact of CVE-2021-22960 can be substantial given the widespread adoption of NodeJS in web applications, microservices, and cloud environments. HTTP Request Smuggling can allow attackers to bypass security controls such as web application firewalls (WAFs), perform session hijacking, and inject malicious payloads that compromise user data confidentiality and application integrity. This can lead to data breaches, unauthorized access, and service disruptions. Industries with high web exposure such as finance, e-commerce, telecommunications, and government services are particularly at risk. The ability to poison caches or manipulate HTTP requests can also degrade service availability and trustworthiness. Since many European organizations rely on NodeJS for critical infrastructure and customer-facing portals, exploitation could result in regulatory non-compliance (e.g., GDPR violations) and reputational damage. The lack of known exploits in the wild does not diminish the risk, as attackers may develop exploits over time. The vulnerability’s presence across multiple NodeJS versions means a broad attack surface exists, increasing the likelihood of targeted attacks against European enterprises that have not updated their NodeJS environments.

Mitigation Recommendations

1. Upgrade NodeJS to versions that include llhttp 2.1.4 or 6.0.6 and later, where the vulnerability is fixed. This is the most effective mitigation. 2. If immediate upgrade is not feasible, implement strict input validation and filtering on HTTP headers and chunked transfer encoding at the web server or reverse proxy level to detect and block suspicious chunk extensions. 3. Deploy and configure Web Application Firewalls (WAFs) with updated signatures capable of detecting HTTP Request Smuggling attempts, focusing on anomalies in chunked transfer encoding. 4. Conduct thorough security testing including fuzzing and penetration testing specifically targeting HTTP request parsing to identify exploitable desynchronization issues. 5. Monitor HTTP traffic logs for irregularities such as unexpected chunk extensions or malformed requests that could indicate exploitation attempts. 6. Educate development and operations teams about the risks of HTTP Request Smuggling and ensure secure coding practices around HTTP request handling. 7. Consider isolating vulnerable NodeJS services behind hardened proxies that strictly enforce HTTP protocol compliance. These steps go beyond generic advice by focusing on protocol-level defenses and operational monitoring tailored to the specific parsing flaw.

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: 682d983ac4522896dcbed48f

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

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

Last updated: 8/1/2025, 3:01:31 AM

Views: 10

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