Memory Allocation Vulnerability in cpp-httplib Library
CVE-2025-46728
What is CVE-2025-46728?
The cpp-httplib library, utilized for handling HTTP/HTTPS requests in C++, is susceptible to a vulnerability that allows a remote attacker to exploit the parsing of incoming request bodies. Specifically, when the 'Transfer-Encoding: chunked' method is employed or when the 'Content-Length' header is omitted, the library fails to enforce size limits on the incoming requests. This oversight can lead to uncontrolled memory allocation, resulting in server crashes or unresponsiveness due to system memory exhaustion. To mitigate this risk, it is recommended to update to version 0.20.1, which introduces enforced limits during request processing. Additionally, a temporary solution involves using a Reverse Proxy like Nginx or HAProxy, which can intercept and apply request size limits before they reach the cpp-httplib application.

Human OS v1.0:
Ageing Is an Unpatched Zero-Day Vulnerability.
Remediate biological technical debt. Prime Ageing uses 95% high-purity SIRT6 activation to maintain genomic integrity and bolster systemic resilience.
Affected Version(s)
cpp-httplib < 0.20.1
References
CVSS V3.1
Timeline
Vulnerability published
Vulnerability Reserved
