How unsafe HTTP methods can expose your website
Unsafe HTTP methods become a problem when a website permits actions without the controls those actions need. HTTP is the protocol browsers and servers use to exchange web requests. Each request specifies a method describing its intended action. Reviewing those methods helps establish whether the server exposes unnecessary capabilities or applies different protection to alternative ways of reaching a function.
What is an unsafe HTTP method?
A method tells a server what kind of request it is receiving. Some methods normally retrieve information. Others support submitting, replacing or deleting it. Modern applications can legitimately need several different methods.
Their safety depends on the purpose, permissions and implementation. A method that changes content may be entirely appropriate for an authorised user, while being unacceptable for an anonymous visitor.
Server components can also provide functions independently of application code. WebDAV, for example, extends web access with file-management capabilities. Unnecessary WebDAV exposure deserves review where the business has no need for those functions.
A list of advertised methods is only an initial clue. Testers need to confirm what the server actually permits and how the relevant access checks behave.
Why it matters
Consider a business that publishes downloadable product documents. The site may need to let customers retrieve those files, while document replacement should remain restricted to an approved publishing process.
If a supporting server feature permits unauthorised changes, someone might alter the material without using the application's publishing screen. That could affect accuracy, customer trust and the availability of important documents.
Another application might apply permission checks inconsistently when the same function is requested through a different method. The business needs to know which controls actually protect the action, rather than assuming that one familiar request path covers every alternative.
CORS security is a separate consideration: it controls how browsers permit certain requests between websites. It does not replace the server's responsibility to check who may read or change a resource.
How penetration testers check for it
- Identify the methods required by agreed business functions and compare them with capabilities advertised or observed on the relevant server routes.
- Confirm permitted behaviour using non-destructive checks and agreed test resources, distinguishing ordinary support from unauthorised access or modification.
- Compare access checks across relevant methods and any supported mechanism for expressing an alternative action, without relying solely on the visible interface.
- Review unnecessary server-level capabilities and diagnostic functions, documenting the actual consequence rather than classifying an unfamiliar method as inherently dangerous.
How to fix it
- Define the methods each route needs and restrict unnecessary ones at the appropriate server or application layer. Preserve those required by legitimate features and integrations.
- Enforce identity and permission checks on every protected action, including supported alternative request handling. Apply the same business rules whichever permitted method reaches it.
- Disable unused file-management and diagnostic capabilities. Separate public document retrieval from the controlled process used to publish or replace those documents.
- Test the complete application after changes, including browser background requests and integrations. Confirm that prohibited actions fail without disrupting required cross-site browser checks.
Review these settings when enabling new server modules or changing routing. A method restriction applied to the main application may not automatically cover a separate directory or management service.
Related issues
- Web server configuration mistakes that expose your data
- Why exposed admin panels need stronger protection
- Broken function-level authorisation in APIs
Read about our methodology or contact pentested.com to discuss testing for your website.