Memory Exhaustion Vulnerability in cpp-httplib: Critical Update Required

cpp-httplib Updated 02 Oct 2025

Summary

10/07/2025
N/A
No i
Unrated
Not published

CVE-2025-53629: cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Affects cpp-httplib across 2 version ranges.

< 17ba303889b8d4d719be3879a70639ab653efb99 < ecfd84c1712b1bfe92107e37843f97ecec537da9

No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

cpp-httplib is a C++11 single-file header-only cross-platform HTTP/HTTPS library that simplifies the process of handling HTTP requests and responses. It is widely used for developing web applications due to its lightweight nature and ease of integration. However, prior to version 0.23.0, cpp-httplib had a critical vulnerability that allowed incoming requests with 'Transfer-Encoding: chunked' to allocate memory arbitrarily, potentially leading to server memory exhaustion.

Vulnerability Detail

The vulnerability arises from the handling of HTTP requests with 'Transfer-Encoding: chunked' headers, which can cause the server to allocate memory without bounds. This can lead to a denial of service (DoS) situation where the server runs out of memory, affecting its availability and performance. This issue is particularly concerning for applications that handle a large number of requests or operate in environments with limited resources. The vulnerability is related to CVE-2025-53628.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can implement request validation to reject any requests that use 'Transfer-Encoding: chunked'. This can be done by checking the headers of incoming requests and responding with an error if the 'Transfer-Encoding' header is present and set to 'chunked'.

Conclusion

In summary, the cpp-httplib package has a critical vulnerability that can lead to memory exhaustion due to improper handling of 'Transfer-Encoding: chunked' requests. It is essential to update to version 0.23.0 or later to mitigate this risk. Implementing request validation can serve as a temporary workaround while you prepare for the update.

See every vulnerability recorded for cpp-httplib →

Share this vulnerability

FAQ

The vulnerability can lead to memory exhaustion on the server, resulting in denial of service and making the application unavailable to users.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without any signup.

Yes, the vulnerability has been fixed in version 0.23.0 of cpp-httplib. It is recommended to update to this version or later.

If an immediate update is not possible, implement request validation to reject 'Transfer-Encoding: chunked' requests as a temporary workaround.

You can find more information about cpp-httplib on its official GitHub repository or documentation pages.

Related vulnerabilities

Recent vulnerabilities recorded for cpp-httplib.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback