Description
Echo is a Go web framework. From 5.0.0 until 5.4.1, Echo v5's ExtractIPFromRealIPHeader validates whether the client-supplied X-Real-IP value belongs to a trusted range instead of validating the direct network peer. A client reaching Echo directly, or through a proxy that preserves the header, can supply a loopback or private address and have Context.RealIP return that spoofed identity. Applications using the extractor for IP allowlists, rate limiting, audit logs, or forwarding headers can consequently trust an attacker-controlled address; the default direct extractor and Echo v4 are unaffected. This issue is fixed in 5.4.1.
Published: 2026-10-28
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: IP spoofing leading to policy bypass
Action: Patch
AI Analysis

Impact

Echo’s ExtractIPFromRealIPHeader incorrectly trusts the X-Real-IP header sent by the client rather than verifying that the value comes from a trusted source. As a result, a client can send a loopback or private IP address in the header and cause the application to treat that spoofed address as the true client identity. This can undermine IP‑based allowlists, rate limiting, audit logs, and request forwarding that rely on the extracted IP.

Affected Systems

The vulnerability affects LabStack Echo version 5.0.0 up to and including 5.4.0. Versions prior to 5.0.0 and the v4 line, which use the default direct extractor, are not affected. The issue is addressed in Echo v5.4.1 and later.

Risk and Exploitability

With a CVSS score of 5.3 and no EPSS data, the likelihood of exploitation is considered moderate. The attack vector is remote, requiring an attacker to forge an X-Real-IP header when contacting an Echo instance directly or through a proxy that preserves the header. The vulnerability is not listed in CISA’s KEV catalog, suggesting no widely known exploits at this time. However, if an application relies on this header for security controls, the possibility of IP spoofing could lead to unauthorized access or denial‑of‑service conditions.

Generated by OpenCVE AI on October 28, 2026 at 20:24 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade LabStack Echo to version 5.4.1 or later.
  • If an upgrade cannot be performed immediately, configure Echo to use the default direct extractor or disable X‑Real‑IP based IP extraction temporarily.
  • Review all IP‑based allowlists, rate‑limiting rules, audit logs, and request‑forwarding logic to ensure they validate the true remote peer IP instead of relying on client‑supplied headers.

Generated by OpenCVE AI on October 28, 2026 at 20:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-h53f-rm2w-w7rg Echo: X-Real-IP extractor trusts the header value instead of the sending peer
History

Wed, 28 Oct 2026 19:15:00 +0000

Type Values Removed Values Added
Description Echo is a Go web framework. From 5.0.0 until 5.4.1, Echo v5's ExtractIPFromRealIPHeader validates whether the client-supplied X-Real-IP value belongs to a trusted range instead of validating the direct network peer. A client reaching Echo directly, or through a proxy that preserves the header, can supply a loopback or private address and have Context.RealIP return that spoofed identity. Applications using the extractor for IP allowlists, rate limiting, audit logs, or forwarding headers can consequently trust an attacker-controlled address; the default direct extractor and Echo v4 are unaffected. This issue is fixed in 5.4.1.
Title Echo: X-Real-IP extractor trusts the header value instead of the sending peer
Weaknesses CWE-348
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-28T19:03:56.934Z

Reserved: 2026-10-27T20:13:55.314Z

Link: CVE-2026-118265

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-28T19:17:31.377

Modified: 2026-10-28T19:17:31.377

Link: CVE-2026-118265

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-28T20:30:07Z

Weaknesses
  • CWE-348

    Use of Less Trusted Source