Arbitrary scheme injection in Echo WWWRedirect and NonWWWRedirect
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Spoofing
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-601.
Summary
Echo, a Go web framework, is affected from 5.0.0 before 5.1.1 and before 4.15.2. Context.Scheme accepts the X-Forwarded-Proto, X-Forwarded-Protocol and X-Url-Scheme headers without checking that they are supported web schemes (CWE-601). WWWRedirect and NonWWWRedirect build the Location header from that value, so an attacker who controls a forwarded scheme header can make a redirect use an arbitrary URI scheme, provided a user interacts with the response.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| labstack | echo | 5.0.0 to before 5.1.1; before 4.15.2 | 5.1.1, 4.15.2 | Patch available | CNA |
| — | github.com/labstack/echo/v5 (Go) | before 5.1.1 | 5.1.1 | Patch available | GHSA-23wf-92cp-8pcj |
| — | github.com/labstack/echo/v4 (Go) | before 4.15.2 | 4.15.2 | Patch available | GHSA-23wf-92cp-8pcj |
- echo Vendorlabstack Affected 5.0.0 to before 5.1.1; before 4.15.2 Fixed in 5.1.1, 4.15.2 Patch available CNA
- github.com/labstack/echo/v5 (Go) Vendor— Affected before 5.1.1 Fixed in 5.1.1 Patch available GHSA-23wf-92cp-8pcj
- github.com/labstack/echo/v4 (Go) Vendor— Affected before 4.15.2 Fixed in 4.15.2 Patch available GHSA-23wf-92cp-8pcj
Remediation
Upgrade github.com/labstack/echo/v4 to 4.15.2 and github.com/labstack/echo/v5 to 5.1.1. The fixed versions are 4.15.2 for the v4 line and 5.1.1 for the v5 line.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA echo (labstack) Fixed in 5.1.1, 4.15.2
- Fix · GHSA-23wf-92cp-8pcj github.com/labstack/echo/v5 (Go) Fixed in 5.1.1 Advisory →
- Fix · GHSA-23wf-92cp-8pcj github.com/labstack/echo/v4 (Go) Fixed in 4.15.2 Advisory →
Vendor assessments
Timeline
- 2026-10-28 Threatist record created from CVE-2026-118658
- 2026-10-28 Alias added: GHSA-23wf-92cp-8pcj
- 2026-10-28 Fix available: Go/github.com/labstack/echo/[email protected], Go/github.com/labstack/echo/[email protected] · GHSA-23wf-92cp-8pcj
- 2026-10-28 CVSS score added · GHSA-23wf-92cp-8pcj
- 2026-10-28 Weakness changed · GHSA-23wf-92cp-8pcj
- 2026-10-28 7 new references · GHSA-23wf-92cp-8pcj
- 2026-11-02 CISA SSVC decision points changed
- 2026-11-02 Priority changed: LOW → MEDIUM
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
Other 7
- https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj
- https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181
- https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df
- https://github.com/labstack/echo/releases/tag/v4.15.2
- https://github.com/labstack/echo/releases/tag/v5.1.1
- https://github.com/labstack/echo/pull/2953
- https://github.com/labstack/echo
More labstack vulnerabilities
- TI-2022-18981 Labstack Echo v4.8.0 was discovered to contain an open redirect vulnerability via the… CVSS 3.1CRITICAL 9.6
- TI-2026-82185 Path decoding mismatch in Echo middleware.Static exposes static files CVSS 3.1HIGH 7.5
- TI-2026-40198 Echo: Encoded slash (%2F) bypasses route-level protection and exposes static files CVSS 3.1HIGH 7.5
- TI-2026-82194 Rate limiter bypass in Echo via spoofed X-Forwarded-For header CVSS 3.1MEDIUM 5.3
- TI-2026-20833 Echo has a Windows path traversal via backslash in middleware.Static default filesystem CVSS 3.1MEDIUM 5.3
- TI-2020-18793 Directory traversal on Windows in github.com/labstack/echo/v4 CVSS 3.1MEDIUM 5.3
Sources
- CVE-2026-118658 · CVE Program
- CVE-2026-118658 · NVD
- FIRST EPSS
- GHSA-23wf-92cp-8pcj · GitHub Advisory Database · CC BY 4.0
- CVE-2026-118658 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences