Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/labstack/echo/v5
  4. ›
  5. GHSA-h53f-rm2w-w7rg

GHSA-h53f-rm2w-w7rg: Echo: X-Real-IP extractor trusts the header value instead of the sending peer

October 23, 2026 (updated October 28, 2026)

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.

References

  • github.com/advisories/GHSA-h53f-rm2w-w7rg
  • github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec
  • github.com/labstack/echo/releases/tag/v5.4.1
  • github.com/labstack/echo/security/advisories/GHSA-h53f-rm2w-w7rg
  • nvd.nist.gov/vuln/detail/CVE-2026-118265

Code Behaviors & Features

Detect and mitigate GHSA-h53f-rm2w-w7rg with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 5.0.0 before 5.4.1

Fixed versions

  • 5.4.1

Solution

Upgrade to version 5.4.1 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-348: Use of Less Trusted Source

Source file

go/github.com/labstack/echo/v5/GHSA-h53f-rm2w-w7rg.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:18 +0000.