{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "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"
              }
            ]
          },
          "events": [
            {
              "introduced": "9500f2745481e2dff1313e2e6734c488e80c13fb"
            },
            {
              "fixed": "87a5c22f2f3d50ca4791e62e5fd8e363c5dae2c2"
            },
            {
              "introduced": "0"
            },
            {
              "fixed": "25685e6f5f7b0683105d1386db46ae48eb3de028"
            },
            {
              "fixed": "ca4f38a474302aabee93c66bdd0052359882e181"
            },
            {
              "fixed": "d1d8ad3f99dd9b80542cd0c357d56a8916c515df"
            }
          ],
          "repo": "https://github.com/labstack/echo",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-23wf-92cp-8pcj"
  ],
  "database_specific": {
    "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"
  },
  "details": "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.",
  "id": "CVE-2026-118658",
  "modified": "2026-10-29T10:30:24.615137299Z",
  "published": "2026-10-28T20:17:11.083Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118658.json"
    },
    {
      "type": "FIX",
      "url": "https://github.com/labstack/echo/commit/ca4f38a474302aabee93c66bdd0052359882e181"
    },
    {
      "type": "FIX",
      "url": "https://github.com/labstack/echo/commit/d1d8ad3f99dd9b80542cd0c357d56a8916c515df"
    },
    {
      "type": "WEB",
      "url": "https://github.com/labstack/echo/releases/tag/v4.15.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/labstack/echo/releases/tag/v5.1.1"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/labstack/echo/security/advisories/GHSA-23wf-92cp-8pcj"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118658"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto"
}