CVE-2025-52887cpp-httplib has unlimited number of http header fields, which causes memory leak
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. In version 0.21.0, when many http headers fields are passed in, the library does not limit the number of headers, and the memory associated with the headers will not be released when the connection is disconnected. This leads to potential exhaustion of system memory and results in a server crash or unresponsiveness. Version 0.22.0 contains a patch for the issue.
What to do
Ubuntu has 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-52887 | |
| Ubuntu 25.10 | cpp-httplib | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2025-52887 | |
| Ubuntu 24.04 | cpp-httplib | Fix pending | UBUNTU-CVE-2025-52887 | |
| Ubuntu 22.04 | cpp-httplib | Fix pending | UBUNTU-CVE-2025-52887 |
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.21.0
References
- https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-xjhg-gf59-p92h
- https://github.com/yhirose/cpp-httplib/commit/28dcf379e82a2cdb544d812696a7fd46067eb7f9
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.