Skip to main content
← All vulnerabilities
CVE-2026-118265EUVD-2026-112397GHSA-H53F-RM2W-W7RG

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 5.4.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: partial

Summary

Echo, a Go web framework, version 5 builds prior to the fix are affected in the X-Real-IP extraction logic, which can let a client impersonate an arbitrary IP address such as a loopback or private address. As a result, applications that rely on that IP for allowlists, rate limiting, or audit logging may trust a spoofed address.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original 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.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: partial

  4. Record last updated

Affected versions

  • labstack echo

    From 5.0.0 · fixed in 5.4.1

  • github.com/labstack/echo/v5Go

    From 5.0.0 · fixed in 5.4.1

References 3

GitHub · labstack/echo