Medium severity · published Oct 28, 2026
CVE-2026-118658
Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto
New
4.7
CVSS
–
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack vector
Network
Complexity
High
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Changed
Exploitation
Is it being used?
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
EC
echo · labstack
>= 5.0.0, < 5.1.1; < 4.15.2 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-118658
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-118658
x_refsource_CONFIRM
https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj
x_refsource_MISC
https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181
x_refsource_MISC
https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df
x_refsource_MISC
https://github.com/labstack/echo/releases/tag/v4.15.2
x_refsource_MISC
https://github.com/labstack/echo/releases/tag/v5.1.1
More from echo
9.6
CVE-2022-40083
Labstack Echo v4.8.0 was discovered to contain an open redirect vulnerability via the Static Handler component
9.1
CVE-2026-118264
Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls
8.2
CVE-2026-118262
Echo: WebSocket proxy can retain connections and handlers after client disconnect
8.2
CVE-2026-118261
Echo: Decompress permits unbounded gzip expansion in v4
8.2
CVE-2026-118260
Echo: BodyDump captures request and response bodies without size limits in v4
