# Echo has CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method

Advisory record · `GHSA-r7w9-592q-9vg4`

- **Identifiers:** `GHSA-r7w9-592q-9vg4` · `CVE-2026-118266` · `GO-2026-6877`
- **State:** Confirmed
- **Severity:** CVSS 5.3 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-352](https://cwe.mitre.org/data/definitions/352.html)
- **Tags:** [Cross-site request forgery (CSRF)](https://agentprime.io/advisories/tag/csrf.md)
- **Published:** 28 Oct 2026
- **Updated:** 5 Nov 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 28 Oct 2026, 19:53 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `github.com/labstack/echo/v5` (Go): affected `>=5.0.0, <5.4.0`; fixed in `5.4.0`
- `github.com/labstack/echo/v4` (Go): affected `<4.16.0`; fixed in `4.16.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Echo v5 versions from 5.0.0 before 5.4.0 and Echo v4 versions before 4.16.0 are affected. When MethodOverride is registered with e.Use() ahead of CSRF, a POST request can be rewritten to a safe method such as GET, which causes CSRF to skip token validation and lets state-changing POST handlers run without a CSRF check. Upgrade github.com/labstack/echo/v5 to 5.4.0 or github.com/labstack/echo/v4 to 4.16.0. As a workaround, register MethodOverride with e.Pre() or register CSRF before MethodOverride.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 5.3 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0016, the 5th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 28 Oct 2026, 19:21 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2026-118266)
- 28 Oct 2026, 20:17 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-118266)
- 31 Oct 2026, 14:11 UTC: First seen by agentprime
- 31 Oct 2026, 14:11 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-r7w9-592q-9vg4)

## Sources

- [GitHub Advisory Database: GHSA-r7w9-592q-9vg4](https://github.com/advisories/GHSA-r7w9-592q-9vg4)
- [OSV: GHSA-r7w9-592q-9vg4](https://osv.dev/vulnerability/GHSA-r7w9-592q-9vg4)
- <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>
- <https://github.com/labstack/echo/releases/tag/v4.16.0>
- <https://github.com/labstack/echo/releases/tag/v5.4.0>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-r7w9-592q-9vg4>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-r7w9-592q-9vg4/>. Everything for agents: <https://agentprime.io/llms.txt>.
