CVE-2026-118265 Echo: X-Real-IP extractor trusts the header value instead of the sending peer
- Exploited in the wild
- Not known
- Fix
- Available
What is CVE-2026-118265?
CVE-2026-118265 is a medium-severity vulnerability in labstack echo, published on 28 Oct 2026.
Official 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.
Weakness: CWE-348
Which versions are affected by CVE-2026-118265?
2 open source packages ship an affected version, including github.com/labstack/echo/v5.
| Package | Affected | Fixed in |
|---|---|---|
github.com/labstack/echo/v5 Go | From 5.0.0 | 5.4.1 |
github.com/labstack/echo/v5 Go | From 5.0.0 | 5.4.1 |
How do I fix CVE-2026-118265?
Upgrade github.com/labstack/echo/v5 to 5.4.1 or later.
Is CVE-2026-118265 being exploited?
There is no known exploitation of CVE-2026-118265 in the wild and no public exploit code.
Sources
Also known as ECHO-691a-c6cd-5f6b, GHSA-h53f-rm2w-w7rg, UBUNTU-CVE-2026-118265.