# CVE-2025-52887: cpp-httplib has unlimited number of http header fields, which causes memory leak

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 45% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-06-26T14:31:52.092Z
- Modified: 2026-06-17T09:37:13.100Z
- Weaknesses: CWE-400
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- yhirose cpp-httplib: = 0.21.0; 0.21.0

## References

- <https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-xjhg-gf59-p92h> (exploit, vendor-advisory)
- <https://github.com/yhirose/cpp-httplib/commit/28dcf379e82a2cdb544d812696a7fd46067eb7f9> (patch)

## Sources

- CVE List: [CVE-2025-52887](https://www.cve.org/CVERecord?id=CVE-2025-52887), CVE Terms of Use, modified 2025-06-26
- NVD: [CVE-2025-52887](https://nvd.nist.gov/vuln/detail/CVE-2025-52887), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-52887 · Whole record: https://cve.day/CVE-2025-52887.json · Rebuilt by cve.day 2026-11-25T22:58:59.652Z
