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

Summary

CVECVE-2026-118266
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-28 20:17:21 UTC
Updated2026-10-28 20:17:21 UTC
DescriptionEcho 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.

Risk And Classification

Primary CVSS: v3.1 5.3 MEDIUM from [email protected]

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

Problem Types: CWE-352 | CWE-352 CWE-352: Cross-Site Request Forgery (CSRF)


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary5.3MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
3.1CNADECLARED5.3MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Labstack Echo affected < 4.16.0 Not specified
CNA Labstack Echo affected >= 5.0.0, < 5.4.0 Not specified

References

ReferenceSourceLinkTags
github.com/labstack/echo/releases/tag/v4.16.0 [email protected] github.com
github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af [email protected] github.com
github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1 [email protected] github.com
github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4 [email protected] github.com
github.com/labstack/echo/releases/tag/v5.4.0 [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report