Description
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.35.0, cpp-httplib (httplib.h) does not enforce Server::set_payload_max_length() on the decompressed request body when using HandlerWithContentReader (streaming ContentReader) with Content-Encoding: gzip (or other supported encodings). A small compressed payload can expand beyond the configured payload limit and be processed by the application, enabling a payload size limit bypass and potential denial of service (CPU/memory exhaustion). This vulnerability is fixed in 0.35.0.
Published: 2026-03-04
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Payload size limit bypass leading to denial of service.
Action: Patch
AI Analysis

Impact

cpp-httplib does not enforce the maximum payload length on a decompressed request body when using streaming ContentReader with Content-Encoding gzip. A small compressed payload can therefore expand beyond the configured limit and be processed by the application, allowing a payload size limit bypass. This flaw can consume excessive CPU or memory, resulting in a denial of service and application unavailability.

Affected Systems

The vulnerability affects the yhirose:cpp-httplib library, specifically versions prior to 0.35.0. The issue arises in the HandlerWithContentReader use case when Server::set_payload_max_length() is not checked after decompression.

Risk and Exploitability

With a CVSS score of 7.5, the flaw is considered high severity but the EPSS score is below 1%, indicating a low probability of exploitation at the current time and it is not listed in the KEV catalog. The likely attack vector is remote, through an HTTP(S) request that includes a gzip‑encoded payload that, when decompressed, exceeds the application’s configured size limit. An attacker can trigger excessive resource consumption and cause a denial of service.

Generated by OpenCVE AI on April 16, 2026 at 13:08 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade cpp-httplib to version 0.35.0 or later where the payload size check is enforced after decompression.
  • If upgrading is not possible, add application‑level enforcement of a strict payload size limit before decompression or reject requests that exceed a safe threshold, especially when Content‑Encoding: gzip is present.
  • Monitor HTTP traffic for unusually large compressed payloads and apply network‑level rate limiting or connection throttling to mitigate memory exhaustion attempts.

Generated by OpenCVE AI on April 16, 2026 at 13:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 05 Mar 2026 22:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:yhirose:cpp-httplib:*:*:*:*:*:*:*:*

Thu, 05 Mar 2026 09:15:00 +0000

Type Values Removed Values Added
First Time appeared Yhirose
Yhirose cpp-httplib
Vendors & Products Yhirose
Yhirose cpp-httplib

Wed, 04 Mar 2026 21:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 04 Mar 2026 20:00:00 +0000

Type Values Removed Values Added
Description cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.35.0, cpp-httplib (httplib.h) does not enforce Server::set_payload_max_length() on the decompressed request body when using HandlerWithContentReader (streaming ContentReader) with Content-Encoding: gzip (or other supported encodings). A small compressed payload can expand beyond the configured payload limit and be processed by the application, enabling a payload size limit bypass and potential denial of service (CPU/memory exhaustion). This vulnerability is fixed in 0.35.0.
Title Payload size limit bypass via gzip decompression in ContentReader (streaming) allows oversized request bodies in cpp-httplib
Weaknesses CWE-400
CWE-409
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

Yhirose Cpp-httplib
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-03-04T20:39:46.131Z

Reserved: 2026-02-27T15:54:05.139Z

Link: CVE-2026-28435

cve-icon Vulnrichment

Updated: 2026-03-04T20:38:32.641Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-04T20:16:19.983

Modified: 2026-03-05T22:09:45.190

Link: CVE-2026-28435

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-16T13:15:06Z

Weaknesses