{"id":"GHSA-23wf-92cp-8pcj","revision":null,"records":[{"revision":"bd3fe41c5b5b4f94be64dc3b11249d6d","observedAt":"2026-11-02T21:57:16.98+00:00","statement":{"source":"cve-program","id":"CVE-2026-118658","aliases":[],"title":"Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto","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.","state":0,"publishedAt":"2026-10-28T20:17:11.083+00:00","modifiedAt":"2026-11-02T20:44:22.513+00:00","affected":[{"ecosystem":"Vendor product","name":"echo","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"labstack\",\n                    \"product\": \"echo\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 5.0.0, < 5.1.1\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"< 4.15.2\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"severity":"MEDIUM"}],"references":["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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-118658","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-118658","identifiers":["CVE-2026-118658"]},"retained":false,"historicalAffected":[]},{"revision":"14225be3146040279344d5a5e5a3d154","observedAt":"2026-11-14T07:09:43.709+00:00","statement":{"source":"euvd","id":"EUVD-2026-112465","aliases":["CVE-2026-118658","GHSA-23wf-92cp-8pcj"],"title":"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 th…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"severity":null}],"references":["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"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-112465","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 28, 2026, 8:17:11 PM","dateUpdated":"Nov 2, 2026, 8:44:22 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-112465","identifiers":["EUVD-2026-112465","CVE-2026-118658","GHSA-23wf-92cp-8pcj"]},"retained":false,"historicalAffected":[]},{"revision":"373a041c379f44a29af5479fd23f70d5","observedAt":"2026-11-03T23:58:59.43+00:00","statement":{"source":"nvd","id":"CVE-2026-118658","aliases":[],"title":"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 th…","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.","state":0,"publishedAt":"2026-10-28T21:16:55.827+00:00","modifiedAt":"2026-11-02T21:17:27.93+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"severity":"MEDIUM"}],"references":["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/security/advisories/GHSA-23wf-92cp-8pcj"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-118658","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Undergoing Analysis","weaknesses":["CWE-601"],"productCriteria":[],"sourceDates":{"published":"2026-10-28T21:16:55.827","lastModified":"2026-11-02T21:17:27.930"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-118658","identifiers":["CVE-2026-118658"]},"retained":false,"historicalAffected":[]},{"revision":"d17af450d899459d92ce92f35b9bc6e9","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GHSA-23wf-92cp-8pcj","aliases":["CVE-2026-118658","GO-2026-6878"],"title":"Echo has Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto","description":"## Summary\n\nThe `c.Scheme()` method in Echo (`context.go:162-181`) trusts the `X-Forwarded-Proto`, `X-Forwarded-Protocol`, and `X-Url-Scheme` request headers without validating that the value is `http` or `https`. The `WWWRedirect()` and `NonWWWRedirect()` middlewares use this unsanitized scheme to construct redirect URLs, allowing an attacker to inject arbitrary URI schemes into the `Location` response header.\n\n## Affected Components\n\n- `context.go:162-181` - `Scheme()` method returns attacker-controlled value verbatim\n- `middleware/redirect.go:172-184` - `redirectWWW`/`redirectNonWWW` use unsanitized scheme\n\n## Proof of Concept\n\n```\nGET /path HTTP/1.1\nHost: example.com\nX-Forwarded-Proto: javascript\n\nResponse:\nHTTP/1.1 301 Moved Permanently\nLocation: javascript://www.example.com/path\n```\n\nConfirmed injectable schemes: `javascript`, `data`, `vbscript`, `file`, `ftp`, `ssh`, `telnet`, `gopher`.\n\nOnly `WWWRedirect()` and `NonWWWRedirect()` (and `WithConfig` variants) are affected. `HTTPSRedirect`, `HTTPSWWWRedirect`, `HTTPSNonWWWRedirect` are NOT affected (they hardcode `https://`).\n\n## Impact\n\n- Open redirect to arbitrary scheme URLs when app is not behind a proxy that strips `X-Forwarded-Proto`\n- Cache poisoning when behind a CDN that caches redirect responses keyed by path\n- `file://` scheme injection could trigger file access in some browser configurations\n\n## Suggested Fix\n\nWhitelist scheme in `c.Scheme()` to only return `http` or `https`:\n\n```go\nfunc (c *Context) Scheme() string {\n    if c.IsTLS() {\n        return \"https\"\n    }\n    if scheme := c.request.Header.Get(HeaderXForwardedProto); scheme != \"\" {\n        scheme = strings.ToLower(strings.TrimSpace(scheme))\n        if scheme == \"https\" {\n            return \"https\"\n        }\n    }\n    return \"http\"\n}\n```\n\n## Disclosure\n\nSource code review, manually verified with actual HTTP server. Tested on Echo v5.0.4 (latest master).\n\n## Patches\n\nFixed in `github.com/labstack/echo/v5` v5.1.1 and `github.com/labstack/echo/v4` v4.15.2. `Context.Scheme()` now accepts only `http`, `https`, `ws` or `wss` from the `X-Forwarded-Proto`, `X-Forwarded-Protocol` and `X-Url-Scheme` headers, and falls back to `http` for any other value (#2953).\n\n## Workarounds\n\nUpgrade to a patched version. If you cannot upgrade, have your edge proxy overwrite or remove the `X-Forwarded-Proto`, `X-Forwarded-Protocol` and `X-Url-Scheme` request headers.","state":0,"publishedAt":"2026-10-28T21:04:10+00:00","modifiedAt":"2026-11-05T23:26:00.516303+00:00","affected":[{"ecosystem":"Go","name":"github.com/labstack/echo/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.1.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/labstack/echo/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.15.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj","https://github.com/labstack/echo/pull/2953","https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181","https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df","https://github.com/labstack/echo","https://github.com/labstack/echo/releases/tag/v4.15.2","https://github.com/labstack/echo/releases/tag/v5.1.1"],"sourceUrl":"https://github.com/advisories/GHSA-23wf-92cp-8pcj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-23wf-92cp-8pcj","identifiers":["GHSA-23wf-92cp-8pcj","CVE-2026-118658","GO-2026-6878"]},"retained":false,"historicalAffected":[]},{"revision":"d178dd01fc064eed881225336df514e3","observedAt":"2026-11-05T23:38:32.248+00:00","statement":{"source":"osv","id":"GO-2026-6878","aliases":["CVE-2026-118658","GHSA-23wf-92cp-8pcj"],"title":"Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto in github.com/labstack/echo","description":"Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto in github.com/labstack/echo","state":0,"publishedAt":"2026-11-05T22:54:32+00:00","modifiedAt":"2026-11-05T23:15:15.4160842+00:00","affected":[{"ecosystem":"Go","name":"github.com/labstack/echo/v4","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.15.2"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/labstack/echo/v5","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"5.1.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["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/pull/2953","https://github.com/labstack/echo/releases/tag/v4.15.2","https://github.com/labstack/echo/releases/tag/v5.1.1"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6878","license":"OSV · upstream source license applies","key":"osv:GO-2026-6878","identifiers":["GO-2026-6878","CVE-2026-118658","GHSA-23wf-92cp-8pcj"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T01:31:01.9957507+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T01:31:01.9957507+00:00","lastSuccessAt":"2026-11-16T01:31:02.3463456+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:02.3464971+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-7de4d7559a5263003f03d9f70577ab06f92ba4178309f26fce53e22a4a959294-a08c72fafec17e60adfc36e9acd6c6ec6cef6a5b72ffb8b77313640ec6c696fa","complete":true,"records":425869,"lastAttemptAt":"2026-11-16T01:30:42.8442275+00:00","lastSuccessAt":"2026-11-16T00:06:05.6008954+00:00","error":"InvalidOperationException","lastVerifiedAt":"2026-11-16T00:06:05.6223396+00:00","snapshotPublishedAt":"2026-11-15T23:23:45+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-f194072360ca43d3bb7796d2607e9f33","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T01:39:56.3390161+00:00","lastSuccessAt":"2026-11-16T01:39:55.322+00:00","error":"51 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T01:39:55.322+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13823,"expectedIdentifiers":13874,"failedIdentifiers":51},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T01:31:01.9957507+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T01:31:01.9957507+00:00","lastSuccessAt":"2026-11-16T01:31:04.1941757+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:04.1941774+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-089bc1eb0cd44b1285000fce46058fed","complete":true,"records":13833,"lastAttemptAt":"2026-11-16T01:31:28.5928984+00:00","lastSuccessAt":"2026-11-16T01:31:28.587+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:28.587+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13874,"expectedIdentifiers":13874,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T01:31:01.864133+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:01.864133+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T01:31:01.2477884+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:01.2477884+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T01:31:01.8942802+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:01.8942802+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-e77c8ea93875d599a3ee92fde74c7150d1a28eacc697b92dc129baff6877c60e","complete":true,"records":232477,"lastAttemptAt":"2026-11-16T01:31:01.714004+00:00","lastSuccessAt":"2026-11-16T01:07:48.2266333+00:00","error":null,"lastVerifiedAt":"2026-11-16T01:31:01.714004+00:00","snapshotPublishedAt":"2026-11-16T01:03:09+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}