CVE-2025-52887

cpp-httplib has unlimited number of http header fields, which causes memory leak

Published Jun 26, 2025 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. In version 0.21.0, when many http headers fields are passed in, the library does not limit the number of headers, and the memory associated with the headers will not be released when the connection is disconnected. This leads to potential exhaustion of system memory and results in a server crash or unresponsiveness. Version 0.22.0 contains a patch for the issue.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-19196 cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. In version 0.21.0, when many http headers fields are passed in, the library does not limit the number of headers, and the memory associated with the headers will not be released when the connection is disconnected. This leads to potential exhaustion of system memory and results in a server crash or unresponsiveness. Version 0.22.0 contains a patch for the issue.
History
Type Values Removed Values Added
CPEs cpe:2.3:a:yhirose:cpp-httplib:0.21.0:*:*:*:*:*:*:*
Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate

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. In version 0.21.0, when many http headers fields are passed in, the library does not limit the number of headers, and the memory associated with the headers will not be released when the connection is disconnected. This leads to potential exhaustion of system memory and results in a server crash or unresponsiveness. Version 0.22.0 contains a patch for the issue.
Title cpp-httplib has unlimited number of http header fields, which causes memory leak
Weaknesses CWE-400
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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 26, 2025, 2:46 PM
Reserved
Jun 20, 2025, 5:42 PM
Status
Analyzed
Published
Jun 26, 2025, 3:15 PM
Modified
Jun 17, 2026, 9:37 AM
Severity
Moderate
Public date
Jun 26, 2025, 2:31 PM