Vulnerability · Published Oct 28, 2026 · Assigned by GitHub_M

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

Medium 5.3

In plain English

A medium-severity cross-site request forgery in echo from labstack. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 6% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.2%top 94.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12golang-github-labstack-echono fix listedDEBIAN-CVE-2026-118266
Debian:13golang-github-labstack-echono fix listedDEBIAN-CVE-2026-118266
Debian:14golang-github-labstack-echono fix listedDEBIAN-CVE-2026-118266
Gogithub.com/labstack/echo/v44.16.0GO-2026-6877
Gogithub.com/labstack/echo/v44.16.0GHSA-r7w9-592q-9vg4
Gogithub.com/labstack/echo/v55.4.0GHSA-r7w9-592q-9vg4
Gogithub.com/labstack/echo/v55.4.0GO-2026-6877
Ubuntu:22.04:LTSgolang-github-labstack-echono fix listedUBUNTU-CVE-2026-118266
Ubuntu:24.04:LTSgolang-github-labstack-echono fix listedUBUNTU-CVE-2026-118266
Ubuntu:26.04:LTSgolang-github-labstack-echono fix listedUBUNTU-CVE-2026-118266
Ubuntu:26.10golang-github-labstack-echono fix listedUBUNTU-CVE-2026-118266
Ubuntu:22.04:LTSgolang-github-labstack-echo.v2no fix listedUBUNTU-CVE-2026-118266
Ubuntu:22.04:LTSgolang-github-labstack-echo.v3no fix listedUBUNTU-CVE-2026-118266

Affected products (as reported)

VendorProductVersions
labstack echo < 4.16.0>= 5.0.0, < 5.4.0

Weakness: CWE-352 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

References