pentesting, updated
Test HTTP methods
Check which HTTP methods the server accepts and whether any of them expose unintended functionality.
Goal
Confirm only the methods the application needs are enabled, and that none of them leak data or bypass controls.
How to test
List the allowed methods, then test the risky ones directly:
curl -sI -X OPTIONS https://example.com/ # Allow: header lists supported methods
curl -s -X TRACE https://example.com/ -H "X: test" # TRACE can echo the request back (XST)
curl -s -X PUT https://example.com/shell.php --data-binary @shell.php
curl -s -X DELETE https://example.com/resource/1
What to look for
TRACE enabled (enables Cross-Site Tracing combined with XSS), PUT/DELETE enabled without auth, or a method bypassing an access control that only checks GET/POST.
References
- OWASP WSTG-CONF-06 — Test HTTP Methods.
- Related: HTTP verb tampering.