CVE-2026-28435

Payload size limit bypass via gzip decompression in ContentReader (streaming) allows oversized request bodies in cpp-httplib

Published Mar 4, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:yhirose:cpp-httplib:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Yhirose
Yhirose cpp-httplib
Vendors & Products Yhirose
Yhirose cpp-httplib
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-409

    Improper Handling of Highly Compressed Data (Data Amplification)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 4, 2026, 8:39 PM
Reserved
Feb 27, 2026, 3:54 PM
Status
Analyzed
Published
Mar 4, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:28 AM