Skip to main content
LowAPIOWASP A05:2021CWE-200

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

  1. 1Restrict Allow to only the verbs you actually serve on that specific path
  2. 2Disable unused HTTP methods at the web server or reverse proxy level
  3. 3Return 405 for any method not explicitly handled

Code examples

Express: explicit method list per route

JavaScript
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

nginx
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.

See every api check

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.

Propose a checkHow a check is built

Scan your own site for options response exposes full method allowlist

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

OPTIONS response exposes full method allowlist | VulnRadar