# GO-2026-6978: CSRF protection bypass via \_method override in github.com/mikehelmick/go-bananas

- Database: Go
- Published: 2026-11-23
- Modified: 2026-11-23

## Affected versions

- github.com/mikehelmick/go-bananas (Go): fixed in 1.0.2

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

## References

- https://github.com/mikehelmick/go-bananas/security/advisories/GHSA-g2rq-85pp-c2j9
- https://github.com/mikehelmick/go-bananas/commit/5b7640b0a46a4be3b02a3b90f511c5a0da6b219b
- https://github.com/mikehelmick/go-bananas/commit/f2b0abd115b3fea1ac75bbe4eda4fb9b3d24f78f
- https://github.com/mikehelmick/go-bananas/releases/tag/v1.0.2

Page: https://cve.now/GO-2026-6978

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
