Vulnerabilities

Vulnerability · CVE-2026-118651

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

Published Oct 28, 2026 · catalog updated Oct 28, 2026 · Echo: Reverse Proxy Forwards

Last checked Nov 4, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-118651. EPSS is 0.21%. Act only if a listed version of Echo: Reverse Proxy Forwards is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (Echo: Reverse Proxy Forwards).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
Medium5.3
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.21%
Remediation
Advisory link
Affected products
Go github.com/labstack/echo/v4 · Go github.com/labstack/echo/v5 · golang github.com

## Summary The Echo proxy middleware ( ) preserves an incoming header verbatim and forwards it to the upstream service when is not configured — which is the default. Because any HTTP client can supply an arbitrary 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. ## Affected Component - — , header-rewriting block (lines 351–355) ## Description ### The header-preservation condition passes spoofed values to upstream ( ) prepares forwarding headers before dispatching each request. The rewrite logic at lines 351-355 reads: The condition is (and therefore overwrites the header with a derived value) only when: - The header is absent — ; **or** - is explicitly configured — The condition is — and the header is left **unchanged** — when the request arrives with an header already set **and** is . Because leaves as , this is the out-of-the-box behaviour for every application that uses or without extra configuration. An attacker who sets to any value causes Echo to forward exactly that value to the upstream, with no modification or validation. ### The comment in the source code confirms intent and the security gap The inline comment at line 351-352 explicitly states: > "Basically it's not good practice to unconditionally pass incoming x-real-ip header to upstream. However, for backward compatibility, legacy behavior is preserved unless you configure Echo#IPExtractor." The framework is aware that the default is insecure and retains it for backward compatibility. No warning appears in the or documentation, so operators who follow the standard setup example receive a silently insecure proxy configuration. This is structurally identical to the documented insecurity in : > "Note: if you don't set explicitly, Echo fallback to legacy behavior, which is not a good choice." ### Full execution chain 1. Attacker sends to the Ech

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • Go github.com/labstack/echo/v44.0.0 → 4.16.2
  • Go github.com/labstack/echo/v50 → 5.4.0
  • golang github.comversion unspecified

How to fix CVE-2026-118651

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-118651. EPSS is 0.21%. Act only if a listed version of Echo: Reverse Proxy Forwards is installed.

Which versions are affected?

Compare what you have installed with 4.0.0 → 4.16.2, 0 → 5.4.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-346. EPSS 0.21%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 28, 2026 · GitLab Advisory Database

    Detected

    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-bas

  2. Oct 28, 2026 · Go Vulnerability Database

    Fix available

    github.com/labstack/echo/v5 fixed in 5.4.0

  3. Oct 28, 2026 · Go Vulnerability Database

    Fix available

    github.com/labstack/echo/v5 fixed in 5.4.0

  4. Oct 28, 2026 · Go Vulnerability Database

    Fix available

    github.com/labstack/echo/v4 fixed in 4.16.2

  5. Oct 28, 2026 · Go Vulnerability Database

    Updated

    ## Summary The Echo proxy middleware ( ) preserves an incoming header verbatim and forwards it to the upstream service when is not configured — which is the default. Because any HTTP client can supply an arbitrary 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 log

Sources

  • CVE.orgVulnerability recordCVE-2026-118651

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-118651

    30-day exploitation probability 0.21%

    first.org
  • GitLab Advisory DatabasePackage advisoryCVE-2026-118651

    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-bas

    advisories.gitlab.com
  • Go Vulnerability DatabasePackage advisoryGHSA-99jh-6h7p-pp36

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

    osv.dev

References

Freshness

Last verified in this catalog Nov 4, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSNov 4, 2026
  • GitLab Advisory DatabaseOct 30, 2026
  • CVE.orgOct 29, 2026
  • Go Vulnerability DatabaseOct 29, 2026