P4 · Info
CSRF protection bypass via _method override in github.com/mikehelmick/go-bananas
- GHSA-g2rq-85pp-c2j9
- GO-2026-6978
Description
middleware.MutateMethod accepts a _method override from the query string or request body and allows overriding the HTTP method to safe methods such as GET. When installed as router middleware ahead of middleware.HandleCSRF, a cross-site POST request with _method=GET is routed to the POST handler while HandleCSRF observes a GET request and skips CSRF token validation.
Text from the OSV record.
Affected
github.com/mikehelmick/go-bananasGo
- all versions, fixed in 1.0.2
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.