CVE-2026-118651: Echo Proxy middleware IP spoofing via X-Real-IP header

CVE-2026-118651 · Severity: medium · CVSS 5.3 · Published 2026-10-28

Echo is a Go web framework used to build web services and APIs. The Proxy middleware component can forward a client-supplied X-Real-IP header to upstream services without validation, allowing attackers to spoof their client IP address. This undermines IP-based security controls such as access restrictions, rate limiting, audit logging, and geographic blocking that upstream services rely on.

Technologies: github.com/labstack/echo/v4 (Go), github.com/labstack/echo/v5 (Go), Labstack Echo. Vendors: Go, Labstack.

Quick answers

Is CVE-2026-118651 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-118651 being exploited in the wild.
How severe is CVE-2026-118651?
Medium severity, with a CVSS score of 5.3, published 28 October 2026.
Which products and versions are affected?
github.com/labstack/echo/v4 (Go) >= 4.0.0, <= 4.16.2, SEMVER:introduced=4.0.0, SEMVER:introduced=4.0.0,last_affected=4.16.2; github.com/labstack/echo/v5 (Go) < 5.4.0, SEMVER:introduced=0,fixed=5.4.0; Labstack Echo 4.0.0 to 5.3.x.
Is there a fix for CVE-2026-118651?
Yes. github.com/labstack/echo/v5 (Go): upgrade to 5.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-118651 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-118651?
Check whether you run github.com/labstack/echo/v4 (Go), github.com/labstack/echo/v5 (Go) or Labstack Echo at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/labstack/echo/v5 (Go): upgrade to 5.4.0 or later
    go get github.com/labstack/echo/v5@v5.4.0

Technical details

The Proxy middleware in Echo versions 4.0.0 through 5.3.x preserved attacker-supplied X-Real-IP headers and forwarded them upstream when Echo#IPExtractor was not configured. An unauthenticated remote attacker can inject a spoofed X-Real-IP header in requests, causing upstream services to record a false client IP address. The fix in v5.4.0 ensures the Proxy middleware always derives X-Real-IP from Context.RealIP() instead of forwarding client-controlled values.

Affected products

  • labstack Echo 4.0.0 to 5.3.x

Identifiers

  • CVE-2026-118651
  • GHSA-99jh-6h7p-pp36
  • GO-2026-6875

Timeline

  • 2026-10-28: disclosed
  • 2026-09-27: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.