Description
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.
Published: 2026-10-28
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: CSRF protection bypass allowing unauthorized state changes
Action: Apply Patch
AI Analysis

Impact

Echo, a Go web framework, contains a flaw in its MethodOverride middleware that can bypass CSRF protection. The vulnerability allows an attacker to rewrite a legitimate POST request into a safe HTTP method before the CSRF middleware evaluates it, causing both token verification and Sec‑Fetch‑Site checks to be skipped. Because the override changes are applied prior to CSRF validation, an attacker can execute state‑changing actions on behalf of an authenticated user without requiring a valid CSRF token.

Affected Systems

The issue affects Echo versions prior to 4.16.0 and 5.4.0. Users running any earlier release of Echo’s core library are potentially exposed. The specific products are the labstack:echo framework for Go, with the affected series being v4.15.x and older, and v5.3.x and earlier.

Risk and Exploitability

The CVSS score of 5.3 indicates a moderate severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, suggesting that it has not yet been widely exploited. Exploitation requires an authenticated victim and a cross‑site request that can control the override value; however, the default header getter for X-HTTP-Method-Override is not settable by a cross‑site form, which limits the ease of attack. The attacker must therefore locate a scenario where the override value can be influenced by the victim’s browser, which is a non‑trivial prerequisite. Overall, the risk is moderate, but organizations should consider patching promptly to eliminate the possibility of an attacker leveraging this bypass.

Generated by OpenCVE AI on October 28, 2026 at 20:42 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Echo to version 4.16.0 or later, or to version 5.4.0 or later, where the MethodOverride middleware has been fixed to prevent safe‑method overrides before CSRF validation.
  • Remove or disable the MethodOverride middleware entirely if the application does not require HTTP method overriding; this eliminates the attack surface associated with CWE‑352.
  • If MethodOverride must be retained, configure it to reject safe method overrides (GET, HEAD, OPTIONS, TRACE) or place the CSRF middleware before MethodOverride so that the request method is validated before any override can occur.

Generated by OpenCVE AI on October 28, 2026 at 20:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r7w9-592q-9vg4 Echo has CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method
History

Wed, 28 Oct 2026 21:00:00 +0000

Type Values Removed Values Added
First Time appeared Labstack
Labstack echo
Vendors & Products Labstack
Labstack echo

Wed, 28 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Echo: CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method
Weaknesses CWE-352
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-28T19:21:47.729Z

Reserved: 2026-10-27T20:13:55.314Z

Link: CVE-2026-118266

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-28T20:17:21.577

Modified: 2026-10-28T20:17:21.577

Link: CVE-2026-118266

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-28T20:45:15Z

Weaknesses
  • CWE-352

    Cross-Site Request Forgery (CSRF)