Live › vulnerability › GHSA-h53f-rm2w-w7rg
Go to dashboardEcho v5's X-Real-IP extractor checks whether the header value is trusted instead of the direct TCP peer, so a client can send an arbitrary loopback or private IP. An attacker can then have c.RealIP() return that spoofed address and bypass IP allowlists, rate limits or audit logging that depend on it.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-23 20:59 UTC. All times on this page are UTC.
| Product | Ecosystem | Affected | Fixed in |
|---|
| github.com/labstack/echo/v5 | go | >= 5.0.0, < 5.4.1 | 5.4.1 |
5.0.0 and < 5.4.1v5.4.1 or laterEach row is the first time that source carried this signal. The analyst’s rows are its own findings.
In Echo v5, ExtractIPFromRealIPHeader checked whether the address supplied in X-Real-IP belonged to a trusted range instead of checking the address of the direct network peer. An untrusted client could therefore supply a loopback or private address and have it returned by c.RealIP() with the extractor's default trust options.
Applications using this extractor for IP allowlists, IP-based rate limiting, audit logs or forwarding headers could accept a spoofed client identity. Exploitation requires that the attacker can reach Echo directly or that an intervening proxy passes through the attacker's X-Real-IP value. Applications using the default direct IP extractor are unaffected. Echo v4 is unaffected by this v5 regression.
All v5 releases from v5.0.0 through v5.4.0 are affected. Upgrade to v5.4.1.
The patch validates the direct peer before accepting a syntactically valid X-Real-IP value, restoring the v4 trust model. Fix commit.
Use ExtractIPDirect until upgrading, or ensure that only trusted proxies can reach Echo and that they replace client-supplied forwarding headers. Configure trusted proxy ranges narrowly for the deployment.
Reported and patched by @rm-Umar. @Duodum independently reported the same issue in GHSA-c3r7-8j36-7mx8, which is tracked as a duplicate of this advisory.
This page as .md · .json · in your agent: get_signal("GHSA-h53f-rm2w-w7rg")
GitHub Advisory Database, CC-BY 4.0. Posts quoted belong to their authors.