CVE-2025-66577: cpp-httplib Untrusted HTTP Header Handling: X-Forwarded-For/X-Real-IP Trust

Published Dec 5, 2025
·
Updated

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 getclientip() in docker/main.cc, causing access and error logs (nginxaccesslogger / nginxerrorlogger) to record spoofed client IPs (log poisoning / audit evasion). This vulnerability is fixed in 0.27.0.

Affected Software

2 affected components
cpp-httplib<0.27.0
Yhirose Cpp-httplib<0.27.0

Event History

Dec 5, 2025
CVE Published
via MITRE·06:20 PM
Data Sourced
via MITRE·06:20 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-66577?

CVE-2025-66577 has a severity rating that indicates a significant risk due to attacker-controlled HTTP headers affecting metadata and authorization decisions.

2

How do I fix CVE-2025-66577?

To fix CVE-2025-66577, upgrade cpp-httplib to version 0.27.0 or later where the vulnerability has been addressed.

3

What versions of cpp-httplib are affected by CVE-2025-66577?

CVE-2025-66577 affects all versions of cpp-httplib prior to 0.27.0.

4

What potential impact does CVE-2025-66577 have on my application?

The impact of CVE-2025-66577 includes unauthorized access to logs, manipulation of server metadata, and potential bypass of authorization controls.

5

Is there a known exploit for CVE-2025-66577?

Currently, there are no publicly disclosed exploits specifically targeting CVE-2025-66577.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203