Method Override CSRF
Exploiting servers that let the HTTP method seen by the router or handler differ from the wire method (GET-reachable mutations,
_method/X-HTTP-Method-Override, HEAD-as-GET,$_REQUESTmerging), which simultaneously defeatsSameSite=Laxand method-conditioned CSRF checks.
How it works
Two controls key on the method, and both break if the handler doesn’t:
SameSite=Laxsends cookies on cross-site top-level safe-method navigations. If a mutation runs on GET, Lax is moot.- CSRF middleware often validates only
POST(or only non-safe methods) —if ($_SERVER['REQUEST_METHOD'] !== 'POST') return true;— or runs on the wire method while routing uses an override.
Override mechanisms: _method in query or body (Symfony, Laravel, Rails, Express method-override), X-HTTP-Method, X-HTTP-Method-Override headers (headers need same-origin JS; params work from a plain link/form), framework routers that send HEAD to the GET handler, and PHP $_REQUEST merging GET/POST/cookie input so a POST handler reads query params.
Techniques / payloads
Lax bypass: wire method GET (cookie attached on top-level nav), effective method POST:
GET /my-account/change-email?email=x%40evil.tld&_method=POST
<form action="https://target/account/transfer" method="GET">
<input type="hidden" name="_method" value="POST">
<input type="hidden" name="recipient" value="x"><input type="hidden" name="amount" value="1">
</form>Test order:
- Replay the POST as GET with params in the query; then
HEAD. - If
405, add_method=POST(query), then in body for aPOST→PUT/PATCH/DELETEdowngrade (avoids preflight). - Check whether the token check is skipped on the GET/HEAD variant even if the method is accepted.
- Look for other GET-reachable body channels (e.g. Apache Juneau’s
contentquery param, CVE-2026-73099). - GraphQL: send the mutation as
GET ?query=. - Deliver via top-level navigation (link,
location=,window.open) — not<img>/iframe, which Lax strips.
Delivery to privileged users: admin bots or support staff that open links in tickets turn a GET CSRF into admin-context execution (bblabs lab of a $200 HackerOne report: password change accepting GET + ticket-reviewing admin bot).
Notable cases
- PortSwigger lab “SameSite Lax bypass via method override” —
405on GET,_method=POSTaccepted; email change. Lab: SameSite Lax Bypass via Method Override - PortSwigger, Web Security Academy: CSRF SameSite Lax Bypass via Method Override, SameSite Lax bypass via method override, k0z1l writeup (frames it as a browser/middleware divergence: Lax keys on the outward verb of a top-level navigation, the middleware on_method) - vtenext < 25.02.2 (CVE-2025-71454) — CSRF protection bypass via HTTP method tampering (CVSS 6.9). vtenext CSRF protection bypass via HTTP method tampering
- FlowIntel < 4.1.0 (GHSA-mrjg-wcmv-396q) — 14 destructive routes (case delete/merge, template edits) accept GET, bypassing Flask-WTF token validation. FlowIntel CSRF
- Thelia — 39 of 40 delete routes and all toggle routes accept GET; token sits in the URL. Thelia back-office CSRF token leak + GET deletes
- Omnispace Agora (CVE-2026-63150) — merges
$_GET/$_POST; forged GET creates admin accounts. Omnispace Agora Project CSRF - visualTicket — state changes exposed via GET without protection; partial fix moved to POST + tokens +
SameSite=Lax. visualTicket CSRF across multiple endpoints - OpenAI Discord verification (P3, Bugcrowd) — state-changing
GET /unlinkondiscord.verify.openai.com. One Link to Unlink: CSRF in OpenAI Discord Verification Service - Webmin 2.670 — referer-exempt GET
index.cgi302s into a firewall setter. Webmin 2.670 firewalld index.cgi CSRF sets zone to trusted - MISP < 2.5.52 (GHSA-626h-r9vm-6mf2) — top-correlation cache and occurrence-count regeneration ran on bodyless GETs linked from the admin UI as plain hyperlinks; a crafted link triggers resource-intensive regeneration (load/DoS, no data impact evidenced). MISP CSRF in correlation management
- WPGSI Spreadsheet Integration < 3.8.5 (CVE-2026-134752) —
wpgsi_show_view()honouredaction=delete&id=on awpgsi-showlink with no nonce check; an admin following the link deletes arbitrary posts/pages. WPGSI Spreadsheet Integration CSRF - OpenMage — OAuth confirm actions skip form-key validation on GET. OpenMage Magento LTS cross-site request forgery (critical)
Defenses
- No side effects on safe methods — enforce at the router (explicit
methods=["POST"]) and audit every GET/HEAD handler. - Disable method override, or allow it only on
POSTbodies and run CSRF validation on the effective method. - CSRF middleware: validate every non-safe effective method; never early-return on method.
- Read inputs from the expected source only (no
$_REQUEST).
Related
Sources
- Lab: SameSite Lax Bypass via Method Override - PortSwigger · original
- Web Security Academy: CSRF SameSite Lax Bypass via Method Override · original
- SameSite Lax bypass via method override · original
- Bypassing SameSite Cookie Restrictions - CSRF - PortSwigger · original
- HTTP method override and admin bot exploitation: CSRF lab from a real report · original
- CSRF (Cross Site Request Forgery) - HackTricks · original
- CSRF: The Bug Everyone Declared Dead and Nobody Actually Fixed · original
- CSRF & Bypasses - Cobalt · original
- vtenext CSRF protection bypass via HTTP method tampering · original
- FlowIntel CSRF · original
- Thelia back-office CSRF token leak + GET deletes · original
- Omnispace Agora Project CSRF · original
- visualTicket CSRF across multiple endpoints · original
- One Link to Unlink: CSRF in OpenAI Discord Verification Service · original
- Webmin 2.670 firewalld index.cgi CSRF sets zone to trusted · original
- OpenMage Magento LTS cross-site request forgery (critical) · original
- Apache Juneau CSRF via the content query parameter (CVE-2026-73099) · original
- Confirming GraphQL DAST findings: introspection, batching, depth/cost, CSRF over GET · original
- Cross-Site Request Forgery Prevention Cheat Sheet - OWASP · original
- Advanced CSRF: How to Bypass SameSite Cookie Protections · original
- PortSwigger CSRF lab: SameSite Lax bypass via method override · original
- MISP CSRF in correlation management · original
- WPGSI Spreadsheet Integration CSRF · original