Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach exposed cpp-httplib server
-
DeliverySend chunked request with size "-2"
-
Exploitstrtoul wraps past ULONG_MAX guard
-
ExecutionRead loop consumes near-max bytes
-
ImpactMemory 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
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.
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
More in Cpp Httplib
View allcpp-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 is a memory exhaustion vulnerability in cpp-httplib versions prior to 0.20.1 that allows unauthenticated
cpp-httplib is a C++ header-only HTTP/HTTPS server and client library. Rated high severity (CVSS 7.5), this vulnerabilit
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 is a Denial of Service vulnerability in cpp-httplib versions prior to 0.23.0 that allows unauthenticated
cpp-httplib versions prior to 0.30.1 are vulnerable to denial of service attacks due to insufficient validation of decom
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. [CVSS 7.5 HIGH]
Cpp-Httplib versions up to 0.30.0 contains a vulnerability that allows attackers to add extra headers, modify request bo
cpp-httplib through 0.5.8 does not filter \r\n in parameters passed into the set_redirect and set_header functions, whic
HTTP response/header injection in cpp-httplib server versions prior to 0.44.0 allows remote unauthenticated attackers to
Remote denial of service in cpp-httplib prior to version 0.37.0 allows unauthenticated attackers to crash server process
A security vulnerability in cpp-httplib (CVSS 5.3) that allows attacker-controlled http headers. Risk factors: public Po
Same weakness CWE-20 – Improper Input Validation
View allSame technique Denial Of Service
View allVendor 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 |
EUVD-2026-33425
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB