CVE-2025-46728cpp-httplib has Unbounded Memory Allocation in Chunked/No-Length Requests
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.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | cpp-httplib | Fix pending | UBUNTU-CVE-2025-46728 | |
| Ubuntu 25.10 | cpp-httplib | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2025-46728 | |
| Ubuntu 24.04 | cpp-httplib | Fix pending | UBUNTU-CVE-2025-46728 | |
| Ubuntu 22.04 | cpp-httplib | Fix pending | UBUNTU-CVE-2025-46728 | |
| Debian 14 | cpp-httplib | Fixed | 0.25.0+ds-3 | DEBIAN-CVE-2025-46728 |
| Debian 13 | cpp-httplib | Fixed | 0.18.7-1+deb13u1 | DEBIAN-CVE-2025-46728 |
| Debian 12 | cpp-httplib | Fix pending | DEBIAN-CVE-2025-46728 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- yhirose cpp-httplib: affected: < 0.20.1
References
- https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-px83-72rx-v57c
- https://github.com/yhirose/cpp-httplib/commit/7b752106ac42bd5b907793950d9125a0972c8e8e
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.