{"id":"GO-2026-6978","summary":"CSRF protection bypass via _method override in github.com/mikehelmick/go-bananas","details":"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.","aliases":["GHSA-g2rq-85pp-c2j9"],"modified":"2026-11-23T20:30:17.046995644Z","published":"2026-11-23T20:04:43Z","database_specific":{"review_status":"REVIEWED","url":"https://pkg.go.dev/vuln/GO-2026-6978"},"references":[{"type":"ADVISORY","url":"https://github.com/mikehelmick/go-bananas/security/advisories/GHSA-g2rq-85pp-c2j9"},{"type":"FIX","url":"https://github.com/mikehelmick/go-bananas/commit/5b7640b0a46a4be3b02a3b90f511c5a0da6b219b"},{"type":"FIX","url":"https://github.com/mikehelmick/go-bananas/commit/f2b0abd115b3fea1ac75bbe4eda4fb9b3d24f78f"},{"type":"WEB","url":"https://github.com/mikehelmick/go-bananas/releases/tag/v1.0.2"}],"affected":[{"package":{"name":"github.com/mikehelmick/go-bananas","ecosystem":"Go","purl":"pkg:golang/github.com/mikehelmick/go-bananas"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.0.2"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/mikehelmick/go-bananas/middleware","symbols":["MutateMethod"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2026-6978.json"}}],"schema_version":"1.9.2"}