CVE-2025-23167 Overview
A flaw in Node.js 20's HTTP parser allows improper termination of HTTP/1 headers using \r\n\rX instead of the required \r\n\r\n. This HTTP Request Smuggling vulnerability (CWE-444) creates an inconsistency between how front-end proxies and back-end Node.js servers interpret HTTP request boundaries, enabling attackers to bypass proxy-based access controls and submit unauthorized requests.
The vulnerability stems from a permissive implementation in the llhttp parsing library, which incorrectly accepts malformed header termination sequences. This parsing discrepancy is particularly dangerous in environments where reverse proxies or load balancers are deployed in front of Node.js applications for security enforcement.
Critical Impact
Attackers can exploit this HTTP Request Smuggling vulnerability to bypass proxy-level security controls, access restricted endpoints, and potentially poison web caches or hijack user sessions in affected Node.js 20.x deployments.
Affected Products
- Node.js 20.x (versions prior to the llhttp v9 upgrade)
- Applications using Node.js 20's built-in HTTP parser behind reverse proxies
- Environments relying on proxy-based access control for Node.js services
Discovery Timeline
- 2025-05-19 - CVE CVE-2025-23167 published to NVD
- 2025-05-19 - Last updated in NVD database
Technical Details for CVE-2025-23167
Vulnerability Analysis
This vulnerability exploits a fundamental inconsistency in how different HTTP parsers interpret request boundaries. HTTP/1.1 specification mandates that headers must be terminated with a \r\n\r\n (CRLF CRLF) sequence. However, the affected versions of llhttp in Node.js 20 incorrectly accept \r\n\rX as a valid header terminator, where X represents any character.
When a front-end proxy strictly adheres to the HTTP specification while the back-end Node.js server accepts malformed sequences, attackers can craft requests that are interpreted differently by each component. This desynchronization allows the attacker to "smuggle" a second request within what the proxy perceives as a single request.
The impact is particularly severe for applications that rely on proxy-level security controls, as attackers can effectively bypass authentication, authorization, and other security measures implemented at the proxy layer.
Root Cause
The root cause lies in the permissive parsing behavior of llhttp versions prior to v9. The parser's state machine did not properly validate the complete \r\n\r\n sequence before transitioning from header parsing to body parsing. This allowed partially-formed termination sequences (\r\n\rX) to be accepted, creating an exploitable discrepancy with stricter HTTP parsers commonly used in proxy servers.
The fix in llhttp v9 enforces strict validation of the header termination sequence, ensuring that only the specification-compliant \r\n\r\n pattern is accepted.
Attack Vector
The attack is network-accessible and requires no authentication or user interaction. An attacker crafts a malicious HTTP request with an improperly terminated header section using \r\n\rX. When this request passes through a reverse proxy that strictly validates HTTP syntax, the proxy sees one request boundary while the Node.js back-end interprets the data differently, treating subsequent bytes as part of a new, smuggled request.
This enables several attack scenarios:
The attacker can bypass proxy-based access controls by smuggling requests to restricted endpoints that the proxy would normally block. Additionally, web cache poisoning becomes possible when the smuggled request causes the cache to store malicious content under a legitimate URL. Session hijacking may occur if the smuggled request can be associated with another user's connection.
Detection Methods for CVE-2025-23167
Indicators of Compromise
- Unusual HTTP requests containing malformed header termination sequences (\r\n\rX patterns)
- Log discrepancies between proxy access logs and Node.js application logs indicating request count mismatches
- Unexpected access to restricted endpoints from seemingly legitimate client connections
- Cache behavior anomalies where stored responses don't match expected content
Detection Strategies
- Deploy network intrusion detection rules to identify HTTP requests with malformed CRLF sequences in header sections
- Implement log correlation between front-end proxy and back-end Node.js servers to detect request count discrepancies
- Monitor for access to restricted endpoints that bypass normal authentication flows
- Use application-level logging to track header parsing behavior and flag unusual patterns
Monitoring Recommendations
- Enable detailed HTTP request logging at both proxy and application layers for forensic analysis
- Configure alerting on request count mismatches between proxy and application server logs
- Monitor Node.js version deployments across infrastructure to identify vulnerable 20.x installations
- Implement regular security audits of proxy-to-backend communication patterns
How to Mitigate CVE-2025-23167
Immediate Actions Required
- Upgrade Node.js 20.x to a version that includes llhttp v9 or later
- Review and audit proxy configurations to ensure strict HTTP compliance validation
- Implement network segmentation to limit exposure of vulnerable Node.js services
- Consider deploying a Web Application Firewall (WAF) with HTTP request smuggling detection capabilities
Patch Information
The vulnerability has been addressed by upgrading the llhttp parser to version 9, which enforces correct header termination validation. Users should upgrade to the latest Node.js 20.x release that includes this fix. For detailed patch information, refer to the Node.js Security Release Blog.
Workarounds
- Configure front-end proxies to normalize and strictly validate all HTTP requests before forwarding to Node.js backends
- Implement connection-level request limits at the proxy layer to reduce the impact of smuggling attacks
- Deploy multiple layers of access control, including both proxy-based and application-level authentication
- Consider temporarily switching to HTTP/2 between proxy and backend if supported, as it is not affected by this parsing issue
- Apply rate limiting and connection timeouts to minimize the window for exploitation
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

