CVE-2026-118651 in Echoinfo

Summary

by MITRE • 10/28/2026

Echo is a Go web framework. From 4.0.0 until 5.4.0, the Proxy middleware can preserve an attacker-supplied X-Real-IP header and forward it to an upstream service when Echo.IPExtractor is not configured. A remote client can therefore make upstream services receive a spoofed client address, undermining IP-based access controls, rate limiting, audit logging, or geographic restrictions that trust Echo's forwarded identity. This issue is fixed in Echo 5.4.0.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/28/2026

The vulnerability identified within the Echo web framework for Go versions ranging from 4.0.0 through 5.4.0 represents a significant security flaw related to how HTTP headers are handled during proxy operations. Specifically, the Proxy middleware exhibits an insecure default configuration regarding the preservation of client identity information. When this middleware is active and no custom IP extraction logic has been defined via the Echo.IPExtractor setting, the framework automatically forwards any X-Real-IP header supplied by a remote client to upstream services without validation or sanitization. This behavior creates a direct pathway for attackers to manipulate how downstream systems perceive the origin of incoming requests, effectively allowing them to spoof their source IP address in the context of backend applications that rely on these headers for security decisions.

From a technical perspective, this flaw stems from an assumption that forwarded identity headers are trustworthy when no explicit extraction mechanism is configured to override or validate them. In standard reverse proxy architectures, it is common practice to strip untrusted client-supplied IP headers and replace them with the actual connection address provided by the load balancer or gateway. However, Echo's default behavior in this version range fails to perform this critical sanitization step for the X-Real-IP header. Consequently, any HTTP request containing an X-Real-IP field will have that value passed through to the backend service as if it were the legitimate client address. This bypasses the intended separation of trust between the edge infrastructure and the application logic, allowing a remote attacker to inject arbitrary values into this header during their initial connection to Echo.

The operational impact of this vulnerability is severe for applications implementing IP-based security controls. Many enterprise systems rely on accurate source IP addresses to enforce access control lists, apply rate limiting thresholds, maintain audit logs for forensic analysis, and restrict service availability based on geographic location or network reputation. By spoofing the X-Real-IP header, an attacker can bypass these protections entirely. For instance, a user who has been blocked due to malicious activity could appear as if they are accessing from an allowed IP range. Similarly, rate limiting mechanisms designed to mitigate denial-of-service attacks may fail because multiple attackers can distribute their requests across spoofed IPs that do not trigger per-IP limits. Additionally, audit trails become unreliable, making it difficult for security teams to trace the true origin of malicious events or comply with regulatory requirements for accurate logging.

This vulnerability aligns closely with CWE-287, which describes Improper Authentication, as well as CWE-918, referring to Server-Side Request Forgery (SSRF) variants where proxy misconfigurations allow manipulation of request context. In the MITRE ATT&CK framework, this behavior facilitates techniques associated with Defense Evasion and Resource Hijacking, specifically by allowing adversaries to mask their true infrastructure location and evade detection systems that rely on IP reputation or geolocation data. The flaw is particularly dangerous in microservices architectures where internal services trust headers passed from edge proxies without independent verification of the client's actual network address.

To mitigate this risk, organizations using Echo versions prior to 5.4.0 must implement a custom IP extraction function via the Echo.IPExtractor configuration option. This function should explicitly ignore or strip any X-Real-IP header provided by clients and instead derive the true client IP from reliable sources such as the actual TCP connection address or trusted forwarder headers like X-Forwarded-For, after validating those against known proxy IPs if necessary. Alternatively, upgrading to Echo version 5.4.0 or later resolves this issue entirely, as the framework has been patched to prevent the automatic forwarding of unvalidated client-supplied IP headers in the Proxy middleware. Security teams should also review their upstream services to ensure they do not blindly trust X-Real-IP headers without corroborating evidence from other trusted sources until the upgrade is complete.

Responsible

GitHub M

Reservation

10/28/2026

Disclosure

10/28/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you know our Splunk app?

Download it now for free!