CVE-2025-66570
BaseFortify
Publication date: 2025-12-05
Last updated on: 2025-12-10
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| yhirose | cpp-httplib | to 0.27.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-290 | This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. |
| CWE-807 | The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism. |
| CWE-345 | The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in cpp-httplib prior to version 0.27.0 allows an attacker to inject specially named HTTP headers (REMOTE_ADDR, REMOTE_PORT, LOCAL_ADDR, LOCAL_PORT) into incoming requests. These attacker-controlled headers are parsed and stored alongside server-generated metadata without removing duplicates. Because the library returns the first occurrence of these headers, downstream code may use the attacker-supplied values instead of the correct server values. This can lead to IP spoofing, log poisoning, and authorization bypass through header shadowing.
How can this vulnerability impact me? :
The vulnerability can impact you by allowing attackers to spoof IP addresses, poison logs with false information, and bypass authorization mechanisms that rely on these headers. This can lead to unauthorized access, inaccurate logging for auditing or forensic purposes, and potential security breaches.
What immediate steps should I take to mitigate this vulnerability?
Upgrade cpp-httplib to version 0.27.0 or later, as this version contains the fix for the vulnerability.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
This vulnerability allows attackers to spoof IP addresses, bypass authorization, and poison logs by injecting attacker-controlled HTTP headers that override internal metadata. Such unauthorized access and log manipulation can lead to breaches of confidentiality and integrity, which are critical concerns under compliance standards like GDPR and HIPAA. Specifically, unauthorized access to sensitive data or systems and tampering with audit logs can violate data protection and security requirements mandated by these regulations. Therefore, if exploited, this vulnerability could result in non-compliance with standards that require strict access controls, accurate logging, and protection of personal or sensitive information. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring HTTP requests for suspicious or unexpected headers named REMOTE_ADDR, REMOTE_PORT, LOCAL_ADDR, and LOCAL_PORT, which should not normally be set by clients. You can use network capture tools like tcpdump or Wireshark to inspect incoming HTTP headers for these spoofed headers. For example, using tcpdump to capture HTTP traffic and grep for these headers: 1. Capture HTTP traffic on port 80 or 443 (if unencrypted): tcpdump -A -s 0 'tcp port 80' | grep -iE 'REMOTE_ADDR|REMOTE_PORT|LOCAL_ADDR|LOCAL_PORT' 2. If HTTPS is used, decrypting traffic or inspecting server logs for these headers may be necessary. Additionally, using curl commands to test if the server accepts and processes these headers can help detect vulnerability: curl -v -H 'REMOTE_ADDR: 1.2.3.4' -H 'REMOTE_PORT: 1234' http://yourserver/path If the server behaves differently or logs show these spoofed headers, it indicates vulnerability. After patching, these headers should be ignored or rejected. Monitoring logs for unexpected IP addresses or authorization bypass events can also help detect exploitation attempts. [1]