Vulnerability · Published Dec 5, 2025 · Assigned by GitHub_M
CVE-2025-66577cpp-httplib Untrusted HTTP Header Handling: X-Forwarded-For/X-Real-IP Trust
Medium 5.3
In plain English
A medium-severity security flaw in cpp-httplib from yhirose. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 22% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 supply X-Forwarded-For or X-Real-IP headers which get accepted unconditionally by get_client_ip() in docker/main.cc, causing access and error logs (nginx_access_logger / nginx_error_logger) to record spoofed client IPs (log poisoning / audit evasion). This vulnerability is fixed in 0.27.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | cpp-httplib | no fix listed | DEBIAN-CVE-2025-66577 |
| Debian:13 | cpp-httplib | no fix listed | DEBIAN-CVE-2025-66577 |
| Debian:14 | cpp-httplib | 0.41.0+ds-3 | DEBIAN-CVE-2025-66577 |
| Ubuntu:25.10 | cpp-httplib | 0.18.7-1ubuntu0.25.10.1 | UBUNTU-CVE-2025-66577 |
| Ubuntu:26.10 | cpp-httplib | no fix listed | UBUNTU-CVE-2025-66577 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| yhirose | cpp-httplib | < 0.27.0 |
Weakness: CWE-117, CWE-807 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N