Skip to main content
VulnerabilityPublished Updated

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

0
Authoritative record:CVE-2026-118265· Medium 5.3

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

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 28 Oct 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Gogithub.com/labstack/echo/v5Affected
  • >=5.0.0 <5.4.1
Fixed in
  • 5.4.1

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.

References

Community reviews

Loading reviews…