Allocation of Resources Without Limits or Throttling Affecting yhirose/cpp-httplib package, versions [,0.20.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.18% (41st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-YHIROSECPPHTTPLIB-10185688
  • published20 May 2025
  • disclosed6 May 2025
  • creditVille Vesilehto

Introduced: 6 May 2025

NewCVE-2025-46728  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade yhirose/cpp-httplib to version 0.20.1 or higher.

Overview

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling through the handling of incoming HTTP requests with Transfer-Encoding: chunked or without a Content-Length header. An attacker can cause uncontrolled memory allocation on the server by sending malformed requests, leading to potential exhaustion of system memory and resulting in a server crash or unresponsiveness.

Workaround

This vulnerability can be mitigated by deploying a reverse proxy (e.g., Nginx, HAProxy) in front of the application. Configure the proxy to enforce maximum request body size limits, thereby stopping excessively large requests before they reach the vulnerable library code.

References

CVSS Base Scores

version 4.0
version 3.1