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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-601"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118658.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "5.0.0"
},
{
"fixed": "5.1.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "0"
},
{
"fixed": "4.15.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "ca4f38a474302aabee93c66bdd0052359882e181"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "d1d8ad3f99dd9b80542cd0c357d56a8916c515df"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "v4.15.2",
"range": [
{
"fixed": "25685e6f5f7b0683105d1386db46ae48eb3de028"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "v5.1.1",
"range": [
{
"fixed": "87a5c22f2f3d50ca4791e62e5fd8e363c5dae2c2"
}
],
"source": "REFERENCES_TAG"
}
]
}