Echo has CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method
影響: go:github.com/labstack/echo/v5 >= 5.0.0, < 5.4.0 → 5.4.0, go:github.com/labstack/echo/v4 < 4.16.0 → 4.16.0
The MethodOverride middleware accepts any non-empty string as the override target method — including safe methods (GET, HEAD, OPTIONS, TRACE) — when rewriting a POST request. When MethodOverride is registered before CSRF in the post-routing middleware chain (e.Use()), it rewrites the request method to a safe method before CSRF evaluates it. The CSRF middleware then skips token validation for the now-safe method, allowing state-changing POST handlers to execute without any CSRF check. Both the l…
| CVE | CVE-2026-118266 |
|---|---|
| 来源 | GitHub Advisory Database |
| 获取时间 | 2026/10/29 09:48 |
| 数据 | Markdown JSON |
2026/10/29 04:53,GitHub Advisory Database 发布了“Echo has CSRF Protection Bypass via MethodOverride Rewriting POST to Safe Method”(类型:漏洞公告)。严重程度为“中危”(medium)。相关技术:Go、GitHub。CVE:CVE-2026-118266。