How to fix: OPTIONS response exposes full method allowlist
A verbose OPTIONS response (Allow: GET, POST, PUT, PATCH, DELETE) leaks the entire verb surface to attackers, simplifying endpoint enumeration.
Why it matters
A verbose Allow header tells attackers exactly which HTTP methods are active, reducing the effort needed to map the API and craft targeted attacks against PUT, PATCH, or DELETE handlers.
A verbose OPTIONS response (Allow: GET, POST, PUT, PATCH, DELETE) leaks the entire verb surface to attackers, simplifying endpoint enumeration.
How to fix it
- 1Restrict Allow to only the verbs you actually serve on that specific path
- 2Disable unused HTTP methods at the web server or reverse proxy level
- 3Return 405 for any method not explicitly handled
Code examples
Express: explicit method list per route
router.route('/items')
.get(listItems)
.post(createItem);
// Catch unsupported methods
router.all('/items', (req, res) => {
res.set('Allow', 'GET, POST').status(405).json({ error: 'Method not allowed' });
});Nginx: restrict methods
location /api/items {
limit_except GET POST OPTIONS {
deny all;
}
}References
Detected automatically by VulnRadar. The check id is api-rest-allow-methods-options-exposed, stable across every scan so you can filter or diff on it.
More api checks
- LowTRACE method referenced in API response body
- InfoREST endpoint allows DELETE
- LowGraphQL introspection field suggestions
- MediumGraphQL endpoint has no rate-limit headers
- LowOpenAPI server URL leaks internal host
- LowCORS preflight result not cached
- HighBearer token in URL query string
- MediumJSONP callback parameter accepted
Questions
- How severe is OPTIONS response exposes full method allowlist?
- VulnRadar rates this low severity in the api category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id api-rest-allow-methods-options-exposed, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does OPTIONS response exposes full method allowlist map to?
- It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.