Unnecessary HTTP Methods Enabled
The server accepts HTTP methods the application does not need, such as PUT, DELETE or WebDAV methods, widening what an attacker can attempt.
| Severity | Low |
| CVSS 3.1 | 3.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N Open in the calculator |
| CVSS 4.0 | 6.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-749: Exposed Dangerous Method or Function |
| OWASP Top 10 | A01:2025 Broken Access Control |
| Category | Security Misconfiguration |
Description
The web server or application accepts HTTP methods beyond those the application needs, which for most web applications are GET, HEAD and POST, with PUT, PATCH and DELETE added only where an API is designed to use them. Commonly found are PUT and DELETE, which can create, replace or remove files where a handler or WebDAV module processes them; the WebDAV methods, such as PROPFIND, MKCOL, COPY, MOVE and LOCK, which can list and change content; and arbitrary or unknown methods that the server treats as GET.
Where an unnecessary method is honoured, an attacker may be able to upload files, including web shells that run code on the server, alter or delete content, or list directory contents. Access rules written for particular methods can also be bypassed: rules in Apache <Limit GET POST> blocks, or Java EE security constraints that list specific methods, leave every other method unrestricted, so the same request sent with another method may reach the protected resource without authentication. In the typical case, however, the methods are accepted but no damaging effect can be shown, because file permissions or handlers prevent it, and the finding represents unnecessary attack surface that a later configuration change could make exploitable.
The methods are identified by sending an OPTIONS request and reading the Allow header but, because that header is not always accurate, each method is also tested directly, for example with curl or the Nmap http-methods script. A method that is shown to change or reveal content, such as a successful PUT upload, is normally reported as a more serious finding in its own right.
Remediation
Accept only the methods each part of the application needs, and refuse the rest, ideally with 405 Method Not Allowed:
- Disable WebDAV where it is not used, for example by removing the WebDAV Publishing feature on IIS, or by disabling
mod_davandmod_dav_fson Apache. - Restrict methods at the web server, as below, and in API frameworks, where each route should accept only the methods it implements. Allow
OPTIONSonly where cross-origin preflight requests need it. - Write access rules that apply to every method and deny by default: use
<LimitExcept>rather than<Limit>in Apache, and<deny-uncovered-http-methods/>in Javaweb.xmlfiles.
In nginx and Apache, allowing GET also allows HEAD. Confirm the fix by sending each unneeded method to the application's paths: each should be refused.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.