Every CVE Search/ Get API key

CVE-2025-52887

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

7.5 HighFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.49%Up 0.4 points since Jun 27, 2025
90%50%10%1%

What each source reports

CVE List Score used 7.5

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

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.

Record
CVE-2025-52887
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400
Updated
2026-11-02
EUVDEUVD-2025-19196 7.5

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.

Record
EUVD-2025-19196
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
NVD 7.5

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.

Record
CVE-2025-52887
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400
Updated
2026-11-02
OSV 7.5

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

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.

Record
CVE-2025-52887
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400
Updated
2026-11-02
OSVOESA-2025-1721 7.5

cpp-httplib security update

A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include httplib.h file in your code!

Security Fix(es):

cpp-httplib is an HTTP/HTTPS server and client library written in C++ by individual developers of yhirose. cpp-httplib version 0.21.0 has a resource management error vulnerability, which originated from the unlimited number of HTTP headers, which may cause the system to run out of memory.(CVE-2025-52887)

Record
OESA-2025-1721
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2025-1722 7.5

cpp-httplib security update

A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include httplib.h file in your code!

Security Fix(es):

cpp-httplib is an HTTP/HTTPS server and client library written in C++ by individual developers of yhirose. cpp-httplib version 0.21.0 has a resource management error vulnerability, which originated from the unlimited number of HTTP headers, which may cause the system to run out of memory.(CVE-2025-52887)

Record
OESA-2025-1722
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 4 moreShow less
OSVOESA-2025-1723 7.5

cpp-httplib security update

A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include httplib.h file in your code!

Security Fix(es):

cpp-httplib is an HTTP/HTTPS server and client library written in C++ by individual developers of yhirose. cpp-httplib version 0.21.0 has a resource management error vulnerability, which originated from the unlimited number of HTTP headers, which may cause the system to run out of memory.(CVE-2025-52887)

Record
OESA-2025-1723
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2025-1724 7.5

cpp-httplib security update

A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include httplib.h file in your code!

Security Fix(es):

cpp-httplib is an HTTP/HTTPS server and client library written in C++ by individual developers of yhirose. cpp-httplib version 0.21.0 has a resource management error vulnerability, which originated from the unlimited number of HTTP headers, which may cause the system to run out of memory.(CVE-2025-52887)

Record
OESA-2025-1724
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2025-1829 7.5

cpp-httplib security update

A C++11 single-file header-only cross platform HTTP/HTTPS library. It's extremely easy to setup. Just include httplib.h file in your code!

Security Fix(es):

cpp-httplib is an HTTP/HTTPS server and client library written in C++ by individual developers of yhirose. cpp-httplib version 0.21.0 has a resource management error vulnerability, which originated from the unlimited number of HTTP headers, which may cause the system to run out of memory.(CVE-2025-52887)

Record
OESA-2025-1829
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2025-52887 7.5

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.

Record
UBUNTU-CVE-2025-52887
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
cpp-httplib
openEuler:22.03-LTS-SP3
before 0.22.0-1.oe2203sp3
0.22.0-1.oe2203sp3
cpp-httplib
openEuler:22.03-LTS-SP4
before 0.22.0-1.oe2203sp4
0.22.0-1.oe2203sp4
cpp-httplib
openEuler:24.03-LTS
before 0.22.0-1.oe2403
0.22.0-1.oe2403
cpp-httplib
openEuler:24.03-LTS-SP1
before 0.22.0-1.oe2403sp1
0.22.0-1.oe2403sp1
cpp-httplib
openEuler:24.03-LTS-SP2
before 0.22.0-1.oe2403sp2
0.22.0-1.oe2403sp2
cpp-httplib
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
0.9.9+ds-10.9.10+ds-10.10.1+ds-10.10.2+ds-10.10.3+ds-10.10.3+ds-1ubuntu0.1~esm10.10.3+ds-1ubuntu0.1~esm2
None known
cpp-httplib
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
0.13.1+ds-1ubuntu10.14.3+ds-10.14.3+ds-1.10.14.3+ds-1.1build10.14.3+ds-1.1build20.14.3+ds-1.1ubuntu0.1~esm10.14.3+ds-1.1ubuntu0.1~esm2
None known
cpp-httplib
Ubuntu:25.10
All versions, plus listed versions
0.18.7-10.18.7-1ubuntu0.25.10.10.18.7-1ubuntu0.25.10.2
None known
cpp-httplib
Ubuntu:Pro:26.04:LTS
All versions, plus listed versions
0.18.7-10.26.0+ds-2ubuntu20.26.0+ds-2ubuntu30.26.0+ds-2ubuntu3+esm1
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-52887 is a high vulnerability (CVSS 7.5) in Yhirose Cpp-httplib, published June 26, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.49%, the 42nd percentile. Fixed in cpp-httplib 0.22.0-1.oe2203sp3.

References

Show 5 moreShow less
MoveEnter Open