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
Share

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

6
Analysis Updated
Jul 22, 2026 - 06:28 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 22, 2026 - 06:22 vuln.today
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
Analysis Generated
May 29, 2026 - 19:47 vuln.today

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.

AnalysisAI

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%.

Technical ContextAI

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:*.

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.

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

Share

CVE-2026-45352 vulnerability details – vuln.today

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