Skip to content
Heist/ feed
Back to feed
Medium

Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto

Type: advisorySources: Official CVE List

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.

Products
echo
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-118658
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 13:24 UTC · Revision 1

Source evidence

Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto

core-cve · Original source

Published 28 Oct 2026, 20:17 UTC

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.

cve:CVE-2026-118658

echo

Fixed versions: Not specified

Complete source record
{
  "id": "6b8845533e4f825666c9b590063e1c256c935ee333bbb7305fc0f3fd73c421b4",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-118658",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto",
    "summary": "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.",
    "evidence": "cve:CVE-2026-118658",
    "products": [
      {
        "name": {
          "value": "echo",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-118658",
      "aliases": [
        "CVE-2026-118658"
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "scope": "CHANGED",
            "version": "3.1",
            "baseScore": 4.7,
            "attackVector": "NETWORK",
            "baseSeverity": "MEDIUM",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N",
            "integrityImpact": "LOW",
            "userInteraction": "REQUIRED",
            "attackComplexity": "HIGH",
            "availabilityImpact": "NONE",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "LOW"
          }
        }
      ],
      "affected": [
        {
          "vendor": "labstack",
          "product": "echo",
          "versions": [
            {
              "status": "affected",
              "version": ">= 5.0.0, < 5.1.1"
            },
            {
              "status": "affected",
              "version": "< 4.15.2"
            }
          ]
        }
      ],
      "modified": "2026-10-28T20:17:11.083Z",
      "provider": "cve",
      "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"
      ],
      "provider_metadata": {
        "cna": {
          "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
          "shortName": "GitHub_M",
          "dateUpdated": "2026-10-28T20:17:11.083Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-118658",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 484715,
  "published_at": "2026-10-28T20:17:11.083+00:00"
}