CVE-2026-21428CWE-93

cpp-httplib has CRLF injection in http headers

High · published January 1, 2026

CVSS v4.0
7.7
EPSS
0%
Percentile
33.5
In the wild
Unconfirmed
What it is

⚡ An unguarded `write_headers` function in cpp-httplib is leaving the door wide open for sneaky extra headers! 🚪💥 This situation is like a restaurant allowing customers to slip in extra items on their order without checking — the kitchen might accidentally whip up a surprise dish that no one wanted. An attacker could exploit this vulnerability to add extra headers, modifying the request body in unexpected ways. When paired with an HTTP/1.1 pipelining server, this could lead to server-side request forgery (SSRF) attacks, potentially redirecting requests to sensitive internal services. The results could be absolutely devastating for your application’s security!

Put simply

This situation is like a restaurant allowing customers to slip in extra items on their order without checking — the kitchen might accidentally whip up a surprise dish that no one wanted. Prior to version 0.30.0, the `write_headers` function in cpp-httplib fails to validate CR and LF characters in user-supplied headers, allowing untrusted input to escape header lines and manipulate requests.

What to do

An attacker could exploit this vulnerability to add extra headers, modifying the request body in unexpected ways. When paired with an HTTP/1.1 pipelining server, this could lead to server-side request forgery (SSRF) attacks, potentially redirecting requests to sensitive internal services. The results could be absolutely devastating for your application’s security! Update cpp-httplib to version 0.30.0 immediately to fix this vulnerability. Additionally, consider implementing strict input validation on headers to prevent similar issues in the future. Regularly audit your libraries for security updates to stay ahead of any potential exploits! You've got this! Patch up and keep your application secure! 🛡️

The record
Technical detail
CVSS v4.0
7.7 · HIGH
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P
EPSS
0.00404 · 33.5th percentile
Weakness
CWE-93 · Improper Neutralization of CRLF Sequences ('CRLF Injection')
Published
2026-01-01T17:54Z
EPSS history
Timeline
  • 01 JAN 17:54Z
    cpp-httplib has CRLF injection in http headers
    cvelistv5