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

CVE-2026-118658: Echo has Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto

October 28, 2026

The c.Scheme() method in Echo (context.go:162-181) trusts the X-Forwarded-Proto, X-Forwarded-Protocol, and X-Url-Scheme request headers without validating that the value is http or https. The WWWRedirect() and NonWWWRedirect() middlewares use this unsanitized scheme to construct redirect URLs, allowing an attacker to inject arbitrary URI schemes into the Location response header.

References

  • github.com/advisories/GHSA-23wf-92cp-8pcj
  • github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181
  • github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df
  • github.com/labstack/echo/pull/2953
  • github.com/labstack/echo/releases/tag/v4.15.2
  • github.com/labstack/echo/releases/tag/v5.1.1
  • github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj
  • nvd.nist.gov/vuln/detail/CVE-2026-118658

Code Behaviors & Features

Detect and mitigate CVE-2026-118658 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.15.2

Fixed versions

  • 4.15.2

Solution

Upgrade to version 4.15.2 or above.

Impact 4.7 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

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

Spotted a mistake? Edit the file on GitLab.

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

Page generated Fri, 30 Oct 2026 12:16:31 +0000.