CVEfocus › CVE database › CVE-2025-46728

CVE-2025-46728cpp-httplib has Unbounded Memory Allocation in Chunked/No-Length Requests

CVSS 7.5 HighEPSS 0.7% (higher than 53% of CVEs)Published 2025-05-06Updated 2025-05-06Assigner: GitHub_M

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.

CWE-400

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

2Fixed
4Fix pending
1Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04cpp-httplibFix pendingUBUNTU-CVE-2025-46728
Ubuntu 25.10cpp-httplibWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2025-46728
Ubuntu 24.04cpp-httplibFix pendingUBUNTU-CVE-2025-46728
Ubuntu 22.04cpp-httplibFix pendingUBUNTU-CVE-2025-46728
Debian 14cpp-httplibFixed0.25.0+ds-3DEBIAN-CVE-2025-46728
Debian 13cpp-httplibFixed0.18.7-1+deb13u1DEBIAN-CVE-2025-46728
Debian 12cpp-httplibFix pendingDEBIAN-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.

References

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.