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

CVE-2026-118657: Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme Headers

October 28, 2026

Context.Scheme() unconditionally trusts four client-controlled HTTP headers to determine the request scheme, with no mechanism to configure trusted sources. This allows a remote unauthenticated attacker to bypass HTTPS redirect enforcement and suppress HSTS headers.

The trusted headers (checked in this order of precedence):

  1. X-Forwarded-Proto
  2. X-Forwarded-Protocol
  3. X-Forwarded-Ssl
  4. X-Url-Scheme

References

  • github.com/advisories/GHSA-2ffq-g2xg-c22p
  • github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1
  • github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af
  • github.com/labstack/echo/releases/tag/v4.16.0
  • github.com/labstack/echo/releases/tag/v5.4.0
  • github.com/labstack/echo/security/advisories/GHSA-2ffq-g2xg-c22p
  • nvd.nist.gov/vuln/detail/CVE-2026-118657

Code Behaviors & Features

Detect and mitigate CVE-2026-118657 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 4.16.0

Fixed versions

  • 4.16.0

Solution

Upgrade to version 4.16.0 or above.

Impact 5.9 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-346: Origin Validation Error

Source file

go/github.com/labstack/echo/v4/CVE-2026-118657.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Thu, 29 Oct 2026 12:16:19 +0000.