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.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.3%top 77.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12cpp-httplibno fix listedDEBIAN-CVE-2025-66577
Debian:13cpp-httplibno fix listedDEBIAN-CVE-2025-66577
Debian:14cpp-httplib0.41.0+ds-3DEBIAN-CVE-2025-66577
Ubuntu:25.10cpp-httplib0.18.7-1ubuntu0.25.10.1UBUNTU-CVE-2025-66577
Ubuntu:26.10cpp-httplibno fix listedUBUNTU-CVE-2025-66577

Affected products (as reported)

VendorProductVersions
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

References