How to fix: HTTP TRACE method enabled
HTTP TRACE method is enabled on the server. TRACE reflects the full request including headers, enabling Cross-Site Tracing (XST) attacks.
Why it matters
Cross-Site Tracing (XST) exploits TRACE to reflect the victim's cookies and Authorization headers, including HttpOnly cookies that JavaScript cannot read, back through the browser in a cross-origin context, enabling session theft even when HttpOnly is correctly set.
HTTP TRACE is intended for diagnostic loop-back testing but is rarely needed in production. When enabled, it can be exploited via XST to steal credentials from authenticated users.
How to fix it
- 1Disable TRACE at the web server or reverse proxy level
- 2In Apache: add TraceEnable Off to httpd.conf
- 3In Nginx: return 405 for TRACE requests
- 4In Express: reject TRACE in a global middleware before routing
Code examples
Nginx: disable TRACE
server {
if ($request_method = TRACE) {
return 405;
}
}Apache: TraceEnable Off
# In httpd.conf
TraceEnable OffExpress.js: reject TRACE globally
app.use((req, res, next) => {
if (req.method === 'TRACE') {
return res.status(405).set('Allow', 'GET, POST, PUT, DELETE').end();
}
next();
});References
Detected automatically by VulnRadar. The check id is trace-method-enabled, 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 HTTP TRACE method enabled?
- VulnRadar rates this medium 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 trace-method-enabled, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does HTTP TRACE method enabled map to?
- It maps to CWE-16. 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.