CVE-2026-21428: CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') in yhirose cpp-httplib
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to version 0.30.0, the ``write_headers`` function does not check for CR & LF characters in user supplied headers, allowing untrusted header value to escape header lines. This vulnerability allows attackers to add extra headers, modify request body unexpectedly & trigger an SSRF attack. When combined with a server that supports http1.1 pipelining (springboot, python twisted etc), this can be used for server side request forgery (SSRF). Version 0.30.0 fixes this issue.
AI Analysis
Technical Summary
CVE-2026-21428 is a vulnerability identified in the cpp-httplib library, a widely used C++11 single-file header-only HTTP/HTTPS library. The root cause is improper neutralization of CRLF (Carriage Return Line Feed) sequences in the write_headers function, which fails to sanitize user-supplied HTTP header values. This allows attackers to inject CRLF characters, effectively breaking out of the intended header line and inserting additional HTTP headers or manipulating the request body. Such injection can be leveraged to perform server-side request forgery (SSRF) attacks, particularly when the vulnerable library is used in conjunction with servers supporting HTTP/1.1 pipelining, including popular frameworks like Spring Boot and Python Twisted. SSRF enables attackers to make unauthorized requests from the vulnerable server to internal or external systems, potentially bypassing firewall restrictions and accessing sensitive resources. The vulnerability is exploitable remotely without authentication or user interaction, increasing its risk profile. The issue was addressed in cpp-httplib version 0.30.0 by adding proper validation to reject CR and LF characters in header values. No known exploits are currently reported in the wild, but the vulnerability’s characteristics make it a significant threat to applications relying on affected versions of cpp-httplib.
Potential Impact
For European organizations, the impact of CVE-2026-21428 can be substantial. SSRF attacks can lead to unauthorized access to internal networks, exposing sensitive data or enabling lateral movement within corporate infrastructures. Organizations using cpp-httplib in web services, microservices, or internal tools risk having their servers manipulated to send crafted requests to internal endpoints, potentially bypassing perimeter defenses. This can result in data breaches, service disruptions, or further exploitation chains. Given the prevalence of HTTP/1.1 pipelining in frameworks popular in Europe, such as Spring Boot (widely used in enterprise Java applications) and Python Twisted, the risk is amplified. The vulnerability’s remote exploitability without authentication means attackers can target exposed services directly, increasing the likelihood of successful attacks. Additionally, the injection of headers might disrupt normal application behavior, causing integrity and availability issues. The lack of known exploits in the wild suggests a window for proactive mitigation before widespread exploitation occurs.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of cpp-httplib to version 0.30.0 or later, where the vulnerability is fixed. Organizations should conduct an inventory of software components to identify usage of vulnerable cpp-httplib versions. For applications where immediate upgrade is not feasible, implement strict input validation and sanitization on all user-supplied HTTP headers to reject CR and LF characters. Employ web application firewalls (WAFs) with rules designed to detect and block CRLF injection attempts. Monitor network traffic for unusual internal requests indicative of SSRF activity. Additionally, restrict outbound network access from servers running vulnerable applications to limit potential SSRF impact. Conduct security code reviews focusing on HTTP header handling and consider deploying runtime application self-protection (RASP) solutions to detect anomalous header manipulations. Finally, maintain up-to-date threat intelligence to respond quickly if exploit code emerges.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy
CVE-2026-21428: CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') in yhirose cpp-httplib
Description
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to version 0.30.0, the ``write_headers`` function does not check for CR & LF characters in user supplied headers, allowing untrusted header value to escape header lines. This vulnerability allows attackers to add extra headers, modify request body unexpectedly & trigger an SSRF attack. When combined with a server that supports http1.1 pipelining (springboot, python twisted etc), this can be used for server side request forgery (SSRF). Version 0.30.0 fixes this issue.
AI-Powered Analysis
Technical Analysis
CVE-2026-21428 is a vulnerability identified in the cpp-httplib library, a widely used C++11 single-file header-only HTTP/HTTPS library. The root cause is improper neutralization of CRLF (Carriage Return Line Feed) sequences in the write_headers function, which fails to sanitize user-supplied HTTP header values. This allows attackers to inject CRLF characters, effectively breaking out of the intended header line and inserting additional HTTP headers or manipulating the request body. Such injection can be leveraged to perform server-side request forgery (SSRF) attacks, particularly when the vulnerable library is used in conjunction with servers supporting HTTP/1.1 pipelining, including popular frameworks like Spring Boot and Python Twisted. SSRF enables attackers to make unauthorized requests from the vulnerable server to internal or external systems, potentially bypassing firewall restrictions and accessing sensitive resources. The vulnerability is exploitable remotely without authentication or user interaction, increasing its risk profile. The issue was addressed in cpp-httplib version 0.30.0 by adding proper validation to reject CR and LF characters in header values. No known exploits are currently reported in the wild, but the vulnerability’s characteristics make it a significant threat to applications relying on affected versions of cpp-httplib.
Potential Impact
For European organizations, the impact of CVE-2026-21428 can be substantial. SSRF attacks can lead to unauthorized access to internal networks, exposing sensitive data or enabling lateral movement within corporate infrastructures. Organizations using cpp-httplib in web services, microservices, or internal tools risk having their servers manipulated to send crafted requests to internal endpoints, potentially bypassing perimeter defenses. This can result in data breaches, service disruptions, or further exploitation chains. Given the prevalence of HTTP/1.1 pipelining in frameworks popular in Europe, such as Spring Boot (widely used in enterprise Java applications) and Python Twisted, the risk is amplified. The vulnerability’s remote exploitability without authentication means attackers can target exposed services directly, increasing the likelihood of successful attacks. Additionally, the injection of headers might disrupt normal application behavior, causing integrity and availability issues. The lack of known exploits in the wild suggests a window for proactive mitigation before widespread exploitation occurs.
Mitigation Recommendations
The primary mitigation is to upgrade all instances of cpp-httplib to version 0.30.0 or later, where the vulnerability is fixed. Organizations should conduct an inventory of software components to identify usage of vulnerable cpp-httplib versions. For applications where immediate upgrade is not feasible, implement strict input validation and sanitization on all user-supplied HTTP headers to reject CR and LF characters. Employ web application firewalls (WAFs) with rules designed to detect and block CRLF injection attempts. Monitor network traffic for unusual internal requests indicative of SSRF activity. Additionally, restrict outbound network access from servers running vulnerable applications to limit potential SSRF impact. Conduct security code reviews focusing on HTTP header handling and consider deploying runtime application self-protection (RASP) solutions to detect anomalous header manipulations. Finally, maintain up-to-date threat intelligence to respond quickly if exploit code emerges.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-12-29T03:00:29.274Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6956b5dbdb813ff03e73e079
Added to database: 1/1/2026, 5:58:51 PM
Last enriched: 1/1/2026, 6:13:51 PM
Last updated: 1/8/2026, 7:22:41 AM
Views: 18
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-0700: SQL Injection in code-projects Intern Membership Management System
MediumCVE-2025-13679: CWE-862 Missing Authorization in themeum Tutor LMS – eLearning and online course solution
MediumCVE-2026-0699: SQL Injection in code-projects Intern Membership Management System
MediumCVE-2026-0698: SQL Injection in code-projects Intern Membership Management System
MediumCVE-2026-0697: SQL Injection in code-projects Intern Membership Management System
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.