cpp-httplib has Unbounded Memory Allocation in Chunked/No-Length Requests
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-400.
Summary
cpp-httplib is a C++ header-only HTTP/HTTPS server and client library. Prior to version 0.20.1, the library fails to enforce configured size limits on incoming request bodies when `Transfer-Encoding: chunked` is used or when no `Content-Length` header is provided. A remote attacker can send a chunked request without the terminating zero-length chunk, causing uncontrolled memory allocation on the server. This leads to potential exhaustion of system memory and results in a server crash or unresponsiveness. Version 0.20.1 fixes the issue by enforcing limits during parsing. If the limit is exceeded at any point during reading, the connection is terminated immediately. A short-term workaround through a Reverse Proxy is available. If updating the library immediately is not feasible, deploy a reverse proxy (e.g., Nginx, HAProxy) in front of the `cpp-httplib` application. Configure the proxy to enforce maximum request body size limits, thereby stopping excessively large requests before they reach the vulnerable library code.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| yhirose | cpp-httplib | before 0.20.1 | 0.20.1 | Patch available | CNA |
- cpp-httplib Vendoryhirose Affected before 0.20.1 Fixed in 0.20.1 Patch available CNA
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:cpp-httplib_project:cpp-httplib:*:*:*:*:*:*:*:* | before 0.20.1 | Vulnerable | Cpp-httplib Project |
- cpe:2.3:a:cpp-httplib_project:cpp-httplib:*:*:*:*:*:*:*:* Versions before 0.20.1 Vulnerable ·Cpp-httplib Project
Remediation
- Fix · CNA cpp-httplib (yhirose) Fixed in 0.20.1
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-46728
- 2026-10-06 EPSS moved to the 50th–90th percentile
References
More yhirose vulnerabilities
- TI-2026-33163 cpp-httplib: HTTP header value percent-decoding in server-side `parse_header` enables CRLF injection CVSS 3.1CRITICAL 9.9
- TI-2026-53978 cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close() CVSS 4.0HIGH 8.2
- TI-2026-18294 cpp-httplib vulnerable to a denial of service (DOS) using a zip bomb CVSS 4.0HIGH 8.7
- TI-2026-17313 cpp-httplib has CRLF injection in http headers CVSS 4.0HIGH 7.7
- TI-2026-74409 cpp-httplib leaks Cookie headers on cross-origin redirect CVSS 3.1HIGH 7.5
- TI-2026-33146 cpp-httplib DoS: Negative chunk-size in chunked Transfer-Encoding CVSS 3.1HIGH 7.5
Sources
- CVE-2025-46728 · CVE Program
- CVE-2025-46728 · NVD
- FIRST EPSS
- CVE-2025-46728 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences