Skip to main content

cpp-httplib CVE-2026-45352

| EUVDEUVD-2026-33425 HIGH
Improper Input Validation (CWE-20)
2026-05-29 GitHub_M
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed cpp-httplib server
  2. Delivery
    Send chunked request with size "-2"
  3. Exploit
    strtoul wraps past ULONG_MAX guard
  4. Execution
    Read loop consumes near-max bytes
  5. Impact
    Memory exhaustion and process crash

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires the target application to use cpp-httplib's HTTP server to receive requests with chunked Transfer-Encoding (the default HTTP/1.1 path for streamed request bodies) and to be reachable over the network. The CVSS vector (AV:N/AC:L/PR:N/UI:N) indicates no authentication, no user interaction, and low complexity, so no special configuration is needed beyond an exposed cpp-httplib < 0.43.4 endpoint that accepts chunked request bodies. Limiting factors: the impact is confined to availability (process crash/memory exhaustion) with no code execution or data disclosure, and reach depends on the embedded library actually being network-exposed rather than used only as an internal or client component.

Impact

Signals are internally consistent and point to a genuine but bounded availability risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/C:N/I:N/A:H, base 7.5) reflects remote, low-complexity, unauthenticated exploitation with pure availability impact - no confidentiality or integrity loss. SSVC aligns: exploitation=PoC, automatable=yes, technical impact=partial, meaning a crash rather than code execution or data compromise. EPSS is low (0.06%, 18th percentile) and the CVE is not in CISA KEV, so there is no evidence of widespread active exploitation; the PoC-plus-automatable combination nonetheless makes opportunistic crash attempts plausible. This is a real patch-worthy DoS but not a code-execution emergency; prioritize based on whether your cpp-httplib server is internet-exposed.

Exploit ScenarioDerived

An attacker sends a single crafted HTTP request to an exposed cpp-httplib server using chunked Transfer-Encoding with a chunk-size of "-2", which passes the library's guard and wraps to a near-maximum byte count. The server's read loop then attempts to consume an enormous amount of data, exhausting memory and crashing the process. With PoC code available and the attack automatable and unauthenticated, this can be scripted for repeated remote denial of service.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Jul 22, 2026

Denial of service in cpp-httplib before 0.43.4 lets remote unauthenticated attackers crash the server by sending a chunked HTTP request with a negative chunk-size value. Because ChunkedDecoder::read_payload parses the size with std::strtoul(), a value like "-2" wraps to a near-maximum unsigned integer (0xFFFFFFFFFFFFFFFE) that bypasses the library's single guard against ULONG_MAX, driving unbounded memory allocation and a process crash. Publicly available exploit code exists (SSVC: PoC) though it is not in CISA KEV, and EPSS is low at 0.06%.

Earlier versions of this analysis (1)
v1 May 29, 2026 - 19:47 CVSS 5.3

Unbounded memory allocation in cpp-httplib prior to 0.43.4 allows remote unauthenticated attackers to crash the hosting process via a crafted HTTP request using chunked Transfer-Encoding with a negative chunk-size value. The root cause is a silent unsigned wrap-around in strtoul() that bypasses the library's incomplete size guard, causing chunk_remaining to be set to a near-maximum 64-bit value and forcing the server's read loop to attempt consuming that many bytes from the network. No active exploitation has been confirmed (no CISA KEV listing); no public exploit identified at time of analysis.

RemediationAI

Vendor-released patch: 0.43.4 - upgrade the bundled httplib.h to 0.43.4 or later and rebuild every application that statically includes it, since header-only distribution means each consumer must recompile. Track down all vendored copies across your codebases, as a single stale header leaves the service exposed. If immediate patching is not possible, place the cpp-httplib endpoint behind a reverse proxy or WAF that normalizes/validates HTTP chunked Transfer-Encoding and rejects malformed or negative chunk-size fields, and restrict network exposure of the affected service to trusted clients; note this adds an infrastructure dependency and may not catch every malformed-chunk variant, so it is a stopgap rather than a fix. Refer to the advisory at https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-h6wq-j5mv-f3q8.

Affected VersionsENISA

cpp-httplib < 0.43.4

Affected Packages

euvd cpp_httplib fix: 0.43.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

cpp-httplib is a widely-embedded single-file, header-only C++11 HTTP/HTTPS library used to add server or client capabilities to native applications. The flaw is a classic CWE-20 Improper Input Validation of the chunk-size field in HTTP/1.1 chunked Transfer-Encoding. Per C standard §7.22.1.4, std::strtoul() silently accepts a leading minus sign and performs unsigned wrap-around, so strtoul("-2", …, 16) yields ULONG_MAX − 1. The only sanity check (httplib.h line 12833) rejects exactly ULONG_MAX (the "-1" case) but not other negatives, so the wrapped value lands in chunk_remaining and dictates how many bytes the read loop attempts to consume, leading to unbounded allocation/consumption. Affected product per CPE is cpe:2.3:a:yhirose:cpp-httplib:*.

Know when Cpp Httplib gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Remote unauthenticated request with no interaction and low complexity triggers a crash, so AV:N/AC:L/PR:N/UI:N; impact is availability-only (A:H), no C/I loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

4
Analysis Updated
Jul 22, 2026 - 06:28 vuln.today
v2 - CVSS changed
Severity Changed
Jul 22, 2026 - 06:22 NVD
MEDIUM HIGH
CVSS changed
Jul 22, 2026 - 06:22 NVD
5.3 (MEDIUM) 7.5 (HIGH)
Patch available
May 29, 2026 - 21:02 EUVD

DescriptionNVD

cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.43.4, negative chunk-size in chunked Transfer-Encoding causes unbounded memory allocation and process crash. The ChunkedDecoder::read_payload function in cpp-httplib (httplib.h) parses the chunk-size field of HTTP chunked transfer encoding using std::strtoul(). Per the C standard (§7.22.1.4), strtoul silently accepts a leading minus sign, performing unsigned wrap-around: strtoul("-2", …, 16) returns ULONG_MAX − 1 (0xFFFFFFFFFFFFFFFE). The library's only guard (line 12833) rejects ULONG_MAX (the result of "-1"), but any other negative value such as "-2" passes validation. The resulting near-maximum value is stored in chunk_remaining and controls how many bytes the server's read loop consumes from the network. This vulnerability is fixed in 0.43.4.

Executive ViewAI

Why It Matters

cpp-httplib versions before 0.43.4 contain a denial of service vulnerability exploitable by remote attackers, which could interrupt critical services relying on this HTTP library. Organizations running affected versions face potential service outages if exploited, requiring immediate inventory and patching.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 82% exploitable
Prevalence
High
popular header-only C++ HTTP library embedded in many native applications
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-66570 CRITICAL POC
10.0 Dec 05

cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.27.0, a vulnerability allow

CVE-2025-53628 HIGH POC
8.8 Jul 10

CVE-2025-53628 is a memory exhaustion vulnerability in cpp-httplib versions prior to 0.20.1 that allows unauthenticated

CVE-2025-46728 HIGH POC
7.5 May 06

cpp-httplib is a C++ header-only HTTP/HTTPS server and client library. Rated high severity (CVSS 7.5), this vulnerabilit

CVE-2025-52887 HIGH POC
7.5 Jun 26

cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. In version 0.21.0, when many http head

CVE-2025-53629 HIGH POC
7.5 Jul 10

CVE-2025-53629 is a Denial of Service vulnerability in cpp-httplib versions prior to 0.23.0 that allows unauthenticated

CVE-2026-22776 HIGH POC
7.5 Jan 12

cpp-httplib versions prior to 0.30.1 are vulnerable to denial of service attacks due to insufficient validation of decom

CVE-2026-28435 HIGH POC
7.5 Mar 04

cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. [CVSS 7.5 HIGH]

CVE-2026-21428 HIGH POC
7.5 Jan 01

Cpp-Httplib versions up to 0.30.0 contains a vulnerability that allows attackers to add extra headers, modify request bo

CVE-2020-11709 HIGH POC
7.5 Apr 12

cpp-httplib through 0.5.8 does not filter \r\n in parameters passed into the set_redirect and set_header functions, whic

CVE-2026-45372 CRITICAL
9.9 May 29

HTTP response/header injection in cpp-httplib server versions prior to 0.44.0 allows remote unauthenticated attackers to

CVE-2026-29076 MEDIUM POC
5.9 Mar 07

Remote denial of service in cpp-httplib prior to version 0.37.0 allows unauthenticated attackers to crash server process

CVE-2025-66577 MEDIUM POC
5.3 Dec 05

A security vulnerability in cpp-httplib (CVSS 5.3) that allows attacker-controlled http headers. Risk factors: public Po

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Server 16.0 Fixed
SUSE Linux Enterprise Server 16.1 Fixed
SUSE Linux Enterprise Server for SAP applications 16.0 Fixed
SUSE Linux Enterprise Server for SAP applications 16.1 Fixed
openSUSE Leap 16.0 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy