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

- Severity: Medium 4.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-28T20:17:11.083Z
- Modified: 2026-11-05T23:26:00.516Z
- Also known as: GHSA-23wf-92cp-8pcj, GO-2026-6878
- Weaknesses: CWE-601
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- labstack echo: >= 5.0.0, < 5.1.1; < 4.15.2
- github.com/labstack/echo/v5 (Go): before 5.1.1
- github.com/labstack/echo/v4 (Go): before 4.15.2

## Every score

- GitHub_M: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj> (exploit, advisory, web)
- <https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181> (fix, web)
- <https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df> (fix, web)
- <https://github.com/labstack/echo/releases/tag/v4.15.2> (web)
- <https://github.com/labstack/echo/releases/tag/v5.1.1> (web)
- <https://github.com/labstack/echo/pull/2953> (fix, web)
- <https://github.com/labstack/echo> (package)

## Sources

- CVE List: [CVE-2026-118658](https://www.cve.org/CVERecord?id=CVE-2026-118658), CVE Terms of Use, modified 2026-11-02
- GitHub Advisory Database: [GHSA-23wf-92cp-8pcj](https://github.com/advisories/GHSA-23wf-92cp-8pcj), CC-BY-4.0, modified 2026-11-05
- Go Vulnerability Database: [GO-2026-6878](https://pkg.go.dev/vuln/GO-2026-6878), CC-BY-4.0, modified 2026-11-05
- NVD: [CVE-2026-118658](https://nvd.nist.gov/vuln/detail/CVE-2026-118658), Public domain, modified 2026-11-02

---

Page: https://cve.day/CVE-2026-118658 · Whole record: https://cve.day/CVE-2026-118658.json · Rebuilt by cve.day 2026-11-25T22:59:47.688Z
