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

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-28T19:21:47.729Z
- Modified: 2026-11-05T23:26:09.232Z
- Also known as: GHSA-r7w9-592q-9vg4, GO-2026-6877
- Weaknesses: CWE-352
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- labstack echo: < 4.16.0; >= 5.0.0, < 5.4.0
- github.com/labstack/echo/v5 (Go): from 5.0.0 before 5.4.0
- github.com/labstack/echo/v4 (Go): before 4.16.0

## Every score

- GitHub_M: 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`
- GitHub: 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`

## References

- <https://github.com/labstack/echo/security/advisories/GHSA-r7w9-592q-9vg4> (exploit, advisory, web)
- <https://github.com/labstack/echo/commit/b838391e2eade87ae7e5a09d7bb5087bec271ec1> (fix, web)
- <https://github.com/labstack/echo/commit/fc410094b2f3415cf2bf5204082137b205bfd5af> (fix, web)
- <https://github.com/labstack/echo/releases/tag/v4.16.0> (web)
- <https://github.com/labstack/echo/releases/tag/v5.4.0> (web)
- <https://github.com/labstack/echo> (package)

## Sources

- CVE List: [CVE-2026-118266](https://www.cve.org/CVERecord?id=CVE-2026-118266), CVE Terms of Use, modified 2026-11-03
- GitHub Advisory Database: [GHSA-r7w9-592q-9vg4](https://github.com/advisories/GHSA-r7w9-592q-9vg4), CC-BY-4.0, modified 2026-11-05
- Go Vulnerability Database: [GO-2026-6877](https://pkg.go.dev/vuln/GO-2026-6877), CC-BY-4.0, modified 2026-11-05
- NVD: [CVE-2026-118266](https://nvd.nist.gov/vuln/detail/CVE-2026-118266), Public domain, modified 2026-11-03

---

Page: https://cve.day/CVE-2026-118266 · Whole record: https://cve.day/CVE-2026-118266.json · Rebuilt by cve.day 2026-11-25T22:59:47.678Z
