Skip to content
Heist/ feed
Back to feed
Medium

Echo: CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method

Type: advisorySources: Official CVE List

Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Echo's MethodOverride middleware accepts a safe HTTP method as the override target for a POST request. When MethodOverride is registered before CSRF in the post-routing middleware chain, route selection retains the original state-changing POST handler but the override changes the method before CSRF evaluates it, causing both token validation and Sec-Fetch-Site checks to be skipped. A cross-site exploit requires an authenticated victim and an override value that a browser-submitted request can control, such as the form getter used by the advisory reproducer; the default X-HTTP-Method-Override header getter is not settable by a cross-site form. This issue is fixed in 4.16.0 and 5.4.0.

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

Source evidence

Echo: CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method

core-cve · Original source

Published 28 Oct 2026, 19:21 UTC

Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Echo's MethodOverride middleware accepts a safe HTTP method as the override target for a POST request. When MethodOverride is registered before CSRF in the post-routing middleware chain, route selection retains the original state-changing POST handler but the override changes the method before CSRF evaluates it, causing both token validation and Sec-Fetch-Site checks to be skipped. A cross-site exploit requires an authenticated victim and an override value that a browser-submitted request can control, such as the form getter used by the advisory reproducer; the default X-HTTP-Method-Override header getter is not settable by a cross-site form. This issue is fixed in 4.16.0 and 5.4.0.

cve:CVE-2026-118266

echo

Fixed versions: Not specified

Complete source record
{
  "id": "a697cb7dee877ac4b1d1444e41d1f73a7f8ba86c057908b6f04fb4aeef09a223",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-118266",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Echo: CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method",
    "summary": "Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Echo's MethodOverride middleware accepts a safe HTTP method as the override target for a POST request. When MethodOverride is registered before CSRF in the post-routing middleware chain, route selection retains the original state-changing POST handler but the override changes the method before CSRF evaluates it, causing both token validation and Sec-Fetch-Site checks to be skipped. A cross-site exploit requires an authenticated victim and an override value that a browser-submitted request can control, such as the form getter used by the advisory reproducer; the default X-HTTP-Method-Override header getter is not settable by a cross-site form. This issue is fixed in 4.16.0 and 5.4.0.",
    "evidence": "cve:CVE-2026-118266",
    "products": [
      {
        "name": {
          "value": "echo",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-118266",
      "aliases": [
        "CVE-2026-118266"
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "scope": "UNCHANGED",
            "version": "3.1",
            "baseScore": 5.3,
            "attackVector": "NETWORK",
            "baseSeverity": "MEDIUM",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N",
            "integrityImpact": "HIGH",
            "userInteraction": "REQUIRED",
            "attackComplexity": "HIGH",
            "availabilityImpact": "NONE",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "NONE"
          }
        }
      ],
      "affected": [
        {
          "vendor": "labstack",
          "product": "echo",
          "versions": [
            {
              "status": "affected",
              "version": "< 4.16.0"
            },
            {
              "status": "affected",
              "version": ">= 5.0.0, < 5.4.0"
            }
          ]
        }
      ],
      "modified": "2026-10-28T19:21:47.729Z",
      "provider": "cve",
      "references": [
        "https://github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4",
        "https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1",
        "https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af",
        "https://github.com/labstack/echo/releases/tag/v4.16.0",
        "https://github.com/labstack/echo/releases/tag/v5.4.0"
      ],
      "provider_metadata": {
        "cna": {
          "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
          "shortName": "GitHub_M",
          "dateUpdated": "2026-10-28T19:21:47.729Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-118266",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 479122,
  "published_at": "2026-10-28T19:21:47.729+00:00"
}