Echo client IP spoofing in Proxy middleware
labstack echo
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v5 Go |
|
|
| github.com/labstack/echo/v4 Go |
| No fix yet |
labstack echo
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v5 Go |
|
|
| github.com/labstack/echo/v4 Go |
| No fix yet |
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.
From the CVE record · GitHub_M
Echo's Proxy middleware can forward an attacker-supplied X-Real-IP header to an upstream service when Echo.IPExtractor is not configured. A remote client can thereby spoof the client address seen by upstream services that trust the forwarded identity, potentially undermining IP-based controls, rate limiting, or audit logs.
Teams running Go package github.com/labstack/echo/v5 before 5.4.0 or github.com/labstack/echo/v4 from 4.0.0 through 4.16.2 should check their use of Proxy middleware.