External risk intelligence

cpp-httplib Header Injection Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.9)

CVE-2026-45372

The vulnerable component is a header-only HTTP/HTTPS server library used by developers to build network-facing services and applications. Because it is explicitly designed to handle incoming HTTP requests, products or services incorporating this library are commonly deployed as public-facing web servers, APIs, or internet-accessible services.

Yhirose Cpp Httplib

before 0.44.0

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

The cpp-httplib library, a component used for building HTTP/HTTPS services, contains a critical vulnerability where improperly handled request data could allow malicious input. This could potentially lead to unauthorized access or manipulation of services relying on this library. The main concern is confirming if our environment utilizes this specific library in any network-facing applications.

  • Malicious input can bypass security checks.
  • Affects services handling web requests.
  • Confirm relevance and any exposure.

Attack Path

How an attacker could exploit the issue

An attacker can reach this vulnerability by sending a specially crafted HTTP request to a service using the affected library. The library's server incorrectly processes encoded newline characters within certain header values before validating them. This allows an attacker to inject newlines, potentially leading to unexpected server behavior or further exploitation.

  • Unauthenticated network access required.
  • Malicious HTTP header sent to server.
  • Potential for unexpected behavior or bypass.

Live Threat

Current exploitation, exposure, and threat context

A critical vulnerability in the cpp-httplib library could allow an unauthenticated remote attacker to inject newline characters into header values. When supported by the advisory, this could lead to unexpected behavior or denial of service when the server processes requests.

  • HTTP header values could be compromised.
  • Maliciously crafted HTTP requests may cause this.
  • Uncontrolled data flow or denial of service.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability in a header-only HTTP/HTTPS library affects applications that parse incoming requests. Owners of services or applications built using this library, potentially including development teams, platform teams, or those managing vendor-supplied components, must first identify where the library is deployed and assess its exposure. The immediate next step is to confirm business criticality and accountable ownership before planning a coordinated remediation or mitigation strategy.

  • Identify responsible application owners.
  • Verify library deployment and exposure.
  • Plan coordinated remediation or mitigation.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is cpp-httplib?

cpp-httplib is a single-file, header-only C++ library designed for developers to easily integrate HTTP and HTTPS server or client capabilities into their own applications. Because it is lightweight and portable, it is frequently used to build custom network services, APIs, and web-based tools where simple, cross-platform communication is required.

What is the weakness in CVE-2026-45372?

This vulnerability involves Improper Neutralization of CRLF Sequences, classified as CWE-93. Essentially, the library incorrectly handles percent-encoded newline characters (CRLF) in HTTP headers. Because the library checks for illegal characters before decoding them, an attacker can bypass these checks by sending encoded newlines that the library later converts into active, functional control characters.

How can an attacker trigger this issue?

An attacker triggers this by sending a specially crafted HTTP request to a service using the vulnerable library. The issue occurs specifically when the library processes certain header values. Importantly, this flaw is not triggered by the 'Location' or 'Referer' headers, as the library correctly handles those fields differently than other header values.

Do I need to worry about this if my service is internal?

According to Halo Surface Signal, this library is commonly used in public-facing web servers and APIs because its primary purpose is handling incoming network requests. While internal services are theoretically less exposed than internet-facing ones, any service reachable by a malicious actor—whether on the public internet or an internal network—remains a potential vector for this header injection flaw.

When should I upgrade my software?

You should plan to update as soon as you confirm your applications rely on versions of cpp-httplib prior to 0.44.0. The first step is to inventory your codebase to locate the library, identify the responsible owners for those services, and assess how they interact with network traffic before implementing the version 0.44.0 fix.

References