Memory Exhaustion Vulnerability in cpp-httplib Library by Yhirose
CVE-2025-52887
7.5HIGH
What is CVE-2025-52887?
The cpp-httplib library, a popular single-file header-only C++ HTTP/HTTPS library, is susceptible to a memory exhaustion vulnerability in version 0.21.0. When numerous HTTP header fields are introduced, the library fails to impose a limit on the number of headers. As a result, when the connection is terminated, the memory allocated for these headers remains unreleased. This oversight can lead to significant system memory depletion, potentially causing the server to become unresponsive or crash entirely. A patch addressing this vulnerability is included in version 0.22.0.
Affected Version(s)
cpp-httplib = 0.21.0