Memory Exhaustion Vulnerability in cpp-httplib Library by Yhirose
CVE-2025-52887

7.5HIGH

Key Information:

Vendor

Yhirose

Vendor
CVE Published:
26 June 2025

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

References

CVSS V3.1

Score:
7.5
Severity:
HIGH
Confidentiality:
None
Integrity:
None
Availability:
None
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.
CVE-2025-52887 : Memory Exhaustion Vulnerability in cpp-httplib Library by Yhirose