CVE-2026-118658
Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto
Echo is a Go web framework. Prior to 4.15.2 and 5.1.1, Context.Scheme returns values from X-Forwarded-Proto, X-Forwarded-Protocol, or X-Url-Scheme without validating that they are supported web schemes. WWWRedirect and NonWWWRedirect use that value to construct a Location header, so an attacker controlling a forwarded scheme header can cause a redirect to use an arbitrary URI scheme. Exploitation requires an affected redirect middleware and user interaction with the response; the HTTPS-specific redirect variants hardcode HTTPS and are unaffected. This issue is fixed in 4.15.2 and 5.1.1.
Fixes and workarounds
Fix
github.com/labstack/echo/v5 (Go): OSV reports a fixed version 5.1.1. Check the advisory for supported release branches.
Source: OSV GHSA-23wf-92cp-8pcjFix
github.com/labstack/echo/v4 (Go): OSV reports a fixed version 4.15.2. Check the advisory for supported release branches.
Source: OSV GHSA-23wf-92cp-8pcjAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| echo labstack |
>= 5.0.0, < 5.1.1 (affected) < 4.15.2 (affected) |
CNA: GitHub_M |
github.com/labstack/echo/v5github.com/labstack/echo/v5
Go |
≥ 0; < 5.1.1 (affected, semver); OSV events: introduced 0; fixed 5.1.1Source events (semver)
Other versions: unaffected |
OSV GHSA-23wf-92cp-8pcj |
github.com/labstack/echo/v4github.com/labstack/echo/v4
Go |
≥ 0; < 4.15.2 (affected, semver); OSV events: introduced 0; fixed 4.15.2Source events (semver)
Other versions: unaffected |
OSV GHSA-23wf-92cp-8pcj |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 4.7 medium |
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N | CNA: GitHub_M |
Exploit evidence
- https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj
exploit · ADP: CISA-ADP
References
- https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcjCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181CNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515dfCNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/releases/tag/v4.15.2CNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/releases/tag/v5.1.1CNA: GitHub_M · x_refsource_MISC
- https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcjADP: CISA-ADP · exploit
- https://github.com/advisories/GHSA-23wf-92cp-8pcjOSV / GitHub Security Advisories · advisory
- https://osv.dev/vulnerability/GHSA-23wf-92cp-8pcjOSV / GitHub Security Advisories · osv
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.