# CVE-2026-118266: Echo: CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method

Status: published. Published: 2026-10-28. Updated: 2026-11-03.

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.

## Remediation

- 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) — https://github.com/advisories/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) — https://github.com/advisories/GHSA-r7w9-592q-9vg4

## Affected products and versions

- labstack / echo: < 4.16.0 (affected); >= 5.0.0, < 5.4.0 (affected). Source: CNA: GitHub_M
-  / github.com/labstack/echo/v5 (github.com/labstack/echo/v5): ≥ 5.0.0; < 5.4.0 (affected, semver); OSV events: introduced 5.0.0; fixed 5.4.0. Source: OSV GHSA-r7w9-592q-9vg4
-  / github.com/labstack/echo/v4 (github.com/labstack/echo/v4): ≥ 0; < 4.16.0 (affected, semver); OSV events: introduced 0; fixed 4.16.0. Source: OSV GHSA-r7w9-592q-9vg4

## Severity and prioritization

- CVSS 3.1: 5.3 (medium); CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N; source: CNA: GitHub_M

- CISA KEV: No listing in collected sources

- EPSS: 0.16% as of 2026-11-02; percentile 5.49%

- SSVC: exploitation poc; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: CWE-352

## Exploit evidence

- exploit: https://github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4 (ADP: CISA-ADP)

## References

- https://github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4 (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/labstack/echo/releases/tag/v4.16.0 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/labstack/echo/releases/tag/v5.4.0 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4 (ADP: CISA-ADP; exploit)

- https://github.com/advisories/GHSA-r7w9-592q-9vg4 (OSV / GitHub Security Advisories; advisory)

- https://osv.dev/vulnerability/GHSA-r7w9-592q-9vg4 (OSV / GitHub Security Advisories; osv)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-118266; retrieved 2026-11-03; source updated 2026-11-03

- OSV / GitHub Security Advisories: https://osv.dev/vulnerability/GHSA-r7w9-592q-9vg4; retrieved 2026-11-03; source updated 2026-10-28

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-118266; retrieved 2026-11-03; source updated Not reported

Revision: e0324cb08aa8b889b6c84dcdf0252635cd3dc512f35753fe31517a894b096323

Canonical: https://y2.dev/cve/CVE-2026-118266

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.