CVE-2026-118658: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto in github.com/labstack/echo
Published 2026-11-05 · Updated 2026-11-05 · Also known as GHSA-23wf-92cp-8pcj, GO-2026-6878
Summary
An arbitrary scheme injection vulnerability exists in the WWWRedirect and NonWWWRedirect middlewares of github.com/labstack/echo via the X-Forwarded-Proto header. Engineering teams using affected versions of Echo should review their middleware configuration and update.
Who is affected
Applications utilizing the WWWRedirect or NonWWWRedirect middlewares in github.com/labstack/echo are affected when processing untrusted X-Forwarded-Proto headers. This condition may allow attackers to manipulate redirect schemes improperly. The severity and CWE are not documented.
Exploitability
The vulnerability has a documented EPSS score of 0.002 (83rd percentile). Active exploitation is not listed in the CISA Known Exploited Vulnerabilities database, and the CVSS score and vector are not documented.
Remediation
- Upgrade github.com/labstack/echo/v4 to version 4.15.2 or later.
- Upgrade github.com/labstack/echo/v5 to version 5.1.1 or later.
How to check your project
- Check the go.mod file for dependencies on github.com/labstack/echo/v4 or github.com/labstack/echo/v5.
- Inspect dependency lock files or run 'go list -m github.com/labstack/echo/v4' and 'go list -m github.com/labstack/echo/v5' to verify the exact installed version.
Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| Go | github.com/labstack/echo/v4 |
>= 0, < 4.15.2 | 4.15.2 | go get github.com/labstack/echo/[email protected] |
| Go | github.com/labstack/echo/v5 |
>= 0, < 5.1.1 | 5.1.1 | go get github.com/labstack/echo/[email protected] |
FAQ
Which packages are affected by CVE-2026-118658?
Go packages github.com/labstack/echo/v4 (before 4.15.2) and github.com/labstack/echo/v5 (before 5.1.1) are affected.
Is this vulnerability actively exploited in the wild?
No, CISA Known Exploited Vulnerabilities status is no.
What is the root cause of this vulnerability?
Arbitrary scheme injection occurs in the WWWRedirect and NonWWWRedirect middlewares via the X-Forwarded-Proto header.
Original advisory description
References
- ADVISORY https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj
- FIX https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181
- FIX https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df
- FIX https://github.com/labstack/echo/pull/2953
- WEB https://github.com/labstack/echo/releases/tag/v4.15.2
- WEB https://github.com/labstack/echo/releases/tag/v5.1.1
Source records: GO-2026-6878 (OSV.dev) · EPSS by FIRST, 2026-11-22.