Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/labstack/echo/v5
  4. ›
  5. CVE-2026-118651

CVE-2026-118651: Echo: Reverse Proxy Forwards Attacker-Supplied X-Real-IP to Upstream by Default

October 28, 2026

The Echo proxy middleware (middleware/proxy.go) preserves an incoming X-Real-IP header verbatim and forwards it to the upstream service when Echo#IPExtractor is not configured — which is the default. Because any HTTP client can supply an arbitrary X-Real-IP value, an attacker can cause Echo to relay a spoofed client IP address to every upstream service behind the proxy, undermining upstream IP-based access controls, rate limiting, audit logging, and geo-restriction.

References

  • github.com/advisories/GHSA-99jh-6h7p-pp36
  • github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af
  • github.com/labstack/echo/releases/tag/v5.4.0
  • github.com/labstack/echo/security/advisories/GHSA-99jh-6h7p-pp36
  • nvd.nist.gov/vuln/detail/CVE-2026-118651

Code Behaviors & Features

Detect and mitigate CVE-2026-118651 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 before 5.4.0

Fixed versions

  • 5.4.0

Solution

Upgrade to version 5.4.0 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-346: Origin Validation Error

Source file

go/github.com/labstack/echo/v5/CVE-2026-118651.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Thu, 29 Oct 2026 12:17:31 +0000.