CVE-2026-118265: Echo · X-Real-IP extractor trusts the header value instead of the sending peer
Affects github.com/labstack/echo/v5Source GCVE Database
Not known to be exploited · CVSS 5.3 Medium : upgrade to 5.4.1 when convenient.
Data as of 28 Oct 2026, 20:15 UTC
- Patch
- Available – fixed in 5.4.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 28 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade github.com/labstack/echo/v5 to 5.4.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Gogithub.com/labstack/echo/v5 | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Echo to version 5.4.1 or later, which includes a fix validating the direct peer IP before trusting the X-Real-IP header. Until upgrading, use the ExtractIPDirect extractor instead of ExtractIPFromRealIPHeader. Alternatively, ensure that only trusted proxies can reach Echo and that they replace or sanitize client-supplied forwarding headers. Configure trusted proxy ranges narrowly to reduce risk.
Description
Echo v5 contains a vulnerability in the ExtractIPFromRealIPHeader function where it trusts the X-Real-IP header value without verifying the direct network peer's address. This allows an untrusted client to spoof IP addresses such as loopback or private addresses. Applications relying on this extractor for IP allowlists, rate limiting, audit logs, or forwarding headers may accept spoofed client identities. Versions from 5.0.0 through 5.4.0 are affected. The issue is fixed in version 5.4.1 by validating the direct peer before accepting the X-Real-IP header.