CVE-2025-66570 cpp-httplib Untrusted HTTP Header Handling: Internal Header Shadowing (REMOTE*/LOCAL*)
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: total
- Technology
- DockerUbuntuDebian
Description
cpp-httplib is a C++11 single-file header-only cross platform HTTP/HTTPS library. Prior to 0.27.0, a vulnerability allows attacker-controlled HTTP headers to influence server-visible metadata, logging, and authorization decisions. An attacker can inject headers named REMOTE_ADDR, REMOTE_PORT, LOCAL_ADDR, LOCAL_PORT that are parsed into the request header multimap via read_headers() in httplib.h (headers.emplace), then the server later appends its own internal metadata using the same header names in Server::process_request without erasing duplicates. Because Request::get_header_value returns the first entry for a header key (id == 0) and the client-supplied headers are parsed before server-inserted headers, downstream code that uses these header names may inadvertently use attacker-controlled values. Affected files/locations: cpp-httplib/httplib.h (read_headers, Server::process_request, Request::get_header_value, get_header_value_u64) and cpp-httplib/docker/main.cc (get_client_ip, nginx_access_logger, nginx_error_logger). Attack surface: attacker-controlled HTTP headers in incoming requests flow into the Request.headers multimap and into logging code that reads forwarded headers, enabling IP spoofing, log poisoning, and authorization bypass via header shadowing. This vulnerability is fixed in 0.27.0.
Upgrade path
8 packages: 4 fixed, 4 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/cpp-httplib(Debian 12) | = 0.11.4+ds-1; = 0.11.4+ds-1+deb12u1; = 0.11.4+ds-2; = 0.11.4+ds-3 +24 more | No fix listed | No fix yet |
| debian/cpp-httplib(Debian 13) | = 0.18.7-1; = 0.18.7-1+deb13u1; = 0.20.1+ds-3; = 0.25.0+ds-1 +6 more | No fix listed | No fix yet |
| ubuntu/cpp-httplib(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/cpp-httplib(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| debian/cpp-httplib(Debian 14) | < 0.41.0+ds-3; = 0.18.7-1; = 0.20.1+ds-3; = 0.25.0+ds-1 +4 more | 0.41.0+ds-3 | Fixed |
| ubuntu/cpp-httplib(Ubuntu 22.04) | < 0.10.3+ds-1ubuntu0.1~esm1 | 0.10.3+ds-1ubuntu0.1~esm1 | Fixed |
| ubuntu/cpp-httplib(Ubuntu 24.04) | < 0.14.3+ds-1.1ubuntu0.1~esm1 | 0.14.3+ds-1.1ubuntu0.1~esm1 | Fixed |
| yhirose cpp-httplib | < 0.27.0; = < 0.27.0 | 0.27.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/cpp-httplib(Debian:12) | All versions | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-1+deb12u1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.11.4+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.13.1+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.1+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.1+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.2+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.3+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.3+ds-1.1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.14.3+ds-1.1~exp1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.15.3+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.15.3+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.15.3+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.16.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.16.3+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.16.3+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.18.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.18.7-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.20.1+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.25.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.26.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-1 | No fix listed |
Show 27 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:12) | = 0.41.0+ds-3~bpo13+1 | No fix listed |
| debian/cpp-httplib(Debian:13) | All versions | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.18.7-1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.18.7-1+deb13u1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.20.1+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.25.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.26.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:13) | = 0.41.0+ds-3~bpo13+1 | No fix listed |
| debian/cpp-httplib(Debian:14) | < 0.41.0+ds-3 | 0.41.0+ds-3 |
| debian/cpp-httplib(Debian:14) | = 0.18.7-1 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.20.1+ds-3 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.25.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.26.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-1 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-2 | No fix listed |
| debian/cpp-httplib(Debian:14) | = 0.41.0+ds-3~bpo13+1 | No fix listed |
| yhirose cpp-httplib | = < 0.27.0 | No fix listed |
| ubuntu/cpp-httplib(Ubuntu:22.04) | < 0.10.3+ds-1ubuntu0.1~esm1 | 0.10.3+ds-1ubuntu0.1~esm1 |
| ubuntu/cpp-httplib(Ubuntu:24.04) | < 0.14.3+ds-1.1ubuntu0.1~esm1 | 0.14.3+ds-1.1ubuntu0.1~esm1 |
| ubuntu/cpp-httplib(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/cpp-httplib(Ubuntu:26.10) | All versions | No fix listed |
| yhirose cpp-httplib | < 0.27.0 | 0.27.0 |
References
- Debian Security Tracker CVE-2025-66570 vendor-advisory
- https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-xm2j-vfr9-mg9m exploit vendor-advisory
- https://github.com/yhirose/cpp-httplib/commit/ac9ebb0ee333ce8bf13523f487bdfad9518a2aff patch
- Ubuntu CVE tracker vendor-advisory
- USN-7962-1 vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking