Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 75%

CVE-2026-45352: CWE-20: Improper Input Validation in yhirose cpp-httplib

0
Medium
VulnerabilityCVE-2026-45352cvecve-2026-45352cwe-20cwe-1285cwe-770
Published: 05/29/2026 (05/29/2026, 19:14:08 UTC)
Source: CVE Database V5
Vendor/Project: yhirose
Product: cpp-httplib

Description

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.

CVSS v3.1

Score 5.3medium

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Affected software

GitHub Actionsmore threats →ai
yhirose/cpp-httplib
pkg:github/yhirose/cpp-httplib
Affected versions
<0.43.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/05/2026, 20:52:44 UTC

Technical Analysis

The cpp-httplib library, a C++11 single-file header-only HTTP/HTTPS library, improperly validates the chunk-size field in HTTP chunked transfer encoding. The function uses std::strtoul() which accepts a leading minus sign and wraps the value unsigned, causing negative chunk sizes like "-2" to be interpreted as near-maximum unsigned values. This value is stored in chunk_remaining and controls the number of bytes read from the network, leading to unbounded memory allocation and a process crash. The vulnerability affects versions prior to 0.43.4 and is resolved in 0.43.4.

Potential Impact

An attacker can supply a negative chunk-size value (other than -1) in chunked Transfer-Encoding, causing the library to allocate excessive memory and potentially crash the process using cpp-httplib. This results in a denial of service (DoS) condition. There is no impact on confidentiality or integrity according to the CVSS vector.

Mitigation Recommendations

Upgrade to cpp-httplib version 0.43.4 or later where this vulnerability is fixed. Patch status is confirmed by the vendor's versioning information. No additional mitigations are indicated.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-11T21:40:08.178Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a19e68ee29bf47b50037d67

Added to database: 05/29/2026, 19:18:38 UTC

Last enriched: 06/05/2026, 20:52:44 UTC

Last updated: 07/31/2026, 19:22:59 UTC

Views: 83

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses