HTTP Method Alternative Check
Test whether authorization discriminates by HTTP method, so an operation gated for GET stays gated for POST, PATCH, DELETE and overrides
Use when: routes accept more than one method or the framework poaches methods such as HEAD, OPTIONS or platform-modified verbs
Avoid when: each resource exposes a single method and route tables prove it, which closes every relevant path
Procedure
- Determine which methods each route actually serves by checking its implementation, not by assuming REST symmetry.
- Send the same protected resource with every accepted method while keeping only the caller credential as the variable.
- Include HEAD and OPTIONS, which frameworks frequently serve before reaching handler authorization code.
- Test platform or header-based method overrides such as X-HTTP-Method-Override where the framework documents them.
- Confirm the object-level and function-level checks apply identically under every method that reaches data access.
- Record a full method-by-watch outcome grid for each endpoint so the coverage of the guard is explicit.
Signals
- GET refuses with 403 while HEAD or POST drains or mutates data, showing the check applied only to a subset.
- An override header switches the verb after middleware authorization, reaching handlers that never re-check.
- OPTIONS reveals method support plus handler metadata the documentation omitted, expanding the attack surface map.
- DELETE succeeds for a peer-owned object when the read path refused the identical credential.
Patterns
1. Method grid
op /api/items/{own-owned}: GET=403 HEAD=200 POST=403 DELETE=403 PATCH=200 -> guard covers 3/5
2. Override probe
POST /api/order + X-HTTP-Method-Override: DELETE -> handler invoked? -> override must re-authorize
3. Result row
endpoint=/api/items/{id} methods_tested=5 accepted_methods=2 skips_checks=HEAD,PATCH
Pitfalls
- Firing only the REST-verb tour and missing HEAD or override headers that framework layers answer directly.
- Interpreting a 405 Method Not Allowed as a keyword victory without checking whether data was already touched.
- Assuming one honored method implies all methods are honored, since per-method handlers fork the check entirely.
Done when
- Every accepted method on every sampled protected route has a verdict recorded against the caller credential.
- Method-override paths in the framework have been verified to re-run authorization before any state change.