CVE-2026-118265

Echo: X-Real-IP extractor trusts the header value instead of the sending peer

Published Oct 28, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

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
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Labstack
Labstack echo
Vendors & Products Labstack
Labstack echo
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'}

Weaknesses
  • CWE-348

    Use of Less Trusted Source

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 29, 2026, 8:54 PM
Reserved
Oct 27, 2026, 8:13 PM
Status
Undergoing Analysis
Published
Oct 28, 2026, 7:17 PM
Modified
Nov 4, 2026, 11:10 PM
Severity
Moderate
Public date
Oct 28, 2026, 7:03 PM