CVE-2026-118266Echo: CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method
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.
What to do
Fixed builds are available from Go: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | golang-github-labstack-echo | Fix pending | UBUNTU-CVE-2026-118266 | |
| Ubuntu 26.04 | golang-github-labstack-echo | Under investigation | UBUNTU-CVE-2026-118266 | |
| Ubuntu 24.04 | golang-github-labstack-echo | Under investigation | UBUNTU-CVE-2026-118266 | |
| Ubuntu 22.04 | golang-github-labstack-echo | Under investigation | UBUNTU-CVE-2026-118266 | |
| Ubuntu 22.04 | golang-github-labstack-echo.v2 | Under investigation | UBUNTU-CVE-2026-118266 | |
| Ubuntu 22.04 | golang-github-labstack-echo.v3 | Under investigation | UBUNTU-CVE-2026-118266 | |
| Ubuntu 20.04 | golang-github-labstack-echo.v2 | Fix pending | UBUNTU-CVE-2026-118266 | |
| Ubuntu 20.04 | golang-github-labstack-echo.v3 | Fix pending | UBUNTU-CVE-2026-118266 | |
| Debian 14 | golang-github-labstack-echo | Fix pending | DEBIAN-CVE-2026-118266 | |
| Debian 13 | golang-github-labstack-echo | Fix pending | DEBIAN-CVE-2026-118266 | |
| Debian 12 | golang-github-labstack-echo | Fix pending | DEBIAN-CVE-2026-118266 | |
| Go library | github.com/labstack/echo/v4 | Fixed | 4.16.0 | GO-2026-6877 |
| Go library | github.com/labstack/echo/v5 | Fixed | 5.4.0 | GHSA-r7w9-592q-9vg4 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- labstack echo: affected: < 4.16.0, >= 5.0.0, < 5.4.0
References
- https://github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4
- https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1
- https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af
- https://github.com/labstack/echo/releases/tag/v4.16.0
- https://github.com/labstack/echo/releases/tag/v5.4.0
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.