Public vulnerability disclosure

CVE-2026-118266

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

publishedCWE-352

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.

Technical severity5.3 mediumCVSS 3.1 · CNA: GitHub_M
Published2026-10-28Source updated 2026-11-03
Collected2026-11-033 attributed sources

Fixes and workarounds

Fix

github.com/labstack/echo/v5 (Go): OSV reports a fixed version 5.4.0. Check the advisory for supported release branches.

Source: OSV GHSA-r7w9-592q-9vg4

Fix

github.com/labstack/echo/v4 (Go): OSV reports a fixed version 4.16.0. Check the advisory for supported release branches.

Source: OSV GHSA-r7w9-592q-9vg4

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority
echo
labstack
< 4.16.0 (affected)
>= 5.0.0, < 5.4.0 (affected)
CNA: GitHub_M
github.com/labstack/echo/v5

github.com/labstack/echo/v5
Go
≥ 5.0.0; < 5.4.0 (affected, semver); OSV events: introduced 5.0.0; fixed 5.4.0
Source events (semver)
[
  {
    "introduced": "5.0.0"
  },
  {
    "fixed": "5.4.0"
  }
]

Other versions: unaffected
OSV GHSA-r7w9-592q-9vg4
github.com/labstack/echo/v4

github.com/labstack/echo/v4
Go
≥ 0; < 4.16.0 (affected, semver); OSV events: introduced 0; fixed 4.16.0
Source events (semver)
[
  {
    "introduced": "0"
  },
  {
    "fixed": "4.16.0"
  }
]

Other versions: unaffected
OSV GHSA-r7w9-592q-9vg4

Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.

CVSS assessments

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
3.1 / 5.3
medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:NCNA: GitHub_M

Exploit evidence

References

For agents and automation

Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.

Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.

Endpoints and access details

https://api.y2.dev/api/v2/cyber/cves
https://api.y2.dev/api/v2/cyber/cves/{cveId}

A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.

For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.

Agent access JSON · OpenAPI · CVE API guide