Quick answers
- Is CVE-2026-118657 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-118657 being exploited in the wild.
- How severe is CVE-2026-118657?
- Medium severity, with a CVSS score of 5.9, published 28 October 2026.
- Which products and versions are affected?
- github.com/labstack/echo/v4 (Go) < 4.16.0, SEMVER:introduced=0,fixed=4.16.0; github.com/labstack/echo/v5 (Go) < 5.4.0, SEMVER:introduced=0,fixed=5.4.0; Labstack Echo before 4.16.0 and before 5.4.0.
- Is there a fix for CVE-2026-118657?
- Yes. github.com/labstack/echo/v4 (Go): upgrade to 4.16.0 or later; github.com/labstack/echo/v5 (Go): upgrade to 5.4.0 or later. Until then: Configure Echo#SchemeExtractor to use a restricted extraction strategy (ExtractSchemeDirect or a custom implementation) if direct backend access is not prevented by a trusted proxy, or ensure a reverse proxy is configured to overwrite forwarded headers before they reach Echo. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-118657 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-118657?
- Check whether you run github.com/labstack/echo/v4 (Go), github.com/labstack/echo/v5 (Go) or Labstack Echo at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- github.com/labstack/echo/v4 (Go): upgrade to 4.16.0 or later
go get github.com/labstack/echo/v4@v4.16.0 - github.com/labstack/echo/v5 (Go): upgrade to 5.4.0 or later
go get github.com/labstack/echo/v5@v5.4.0
Configure Echo#SchemeExtractor to use a restricted extraction strategy (ExtractSchemeDirect or a custom implementation) if direct backend access is not prevented by a trusted proxy, or ensure a reverse proxy is configured to overwrite forwarded headers before they reach Echo.
Technical details
Echo's Context.Scheme() method accepted forwarded scheme headers from untrusted clients, violating the principle of only trusting such headers from known proxies. An attacker reaching Echo directly over HTTP could send X-Forwarded-Proto: https to bypass HTTPSRedirect middleware; similarly, behind a TLS-terminating proxy, an attacker could claim HTTP to prevent the Strict-Transport-Security header. The fix restricts forwarded header trust to requests from loopback, link-local, private addresses, or Unix sockets, with configurable SchemeExtractor strategies.
Affected products
- labstack Echo before 4.16.0 and before 5.4.0
Identifiers
- CVE-2026-118657
- GHSA-2ffq-g2xg-c22p
- GO-2026-6879
Timeline
- 2026-10-28: disclosed