HTTP TRACE Method Enabled
The server answers HTTP TRACE requests by echoing back the request it received, which can reveal headers added by proxies and other intermediaries.
| Severity | Low |
| CVSS 3.1 | 3.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/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:L/VI:N/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 a proxy or load balancer in front of it, responds to TRACE requests by returning the request it received, including every header, in the body of the response. The method exists for diagnosing how requests change on their way to the server and is rarely needed in production. Microsoft IIS has historically supported a similar TRACK method.
The method was the basis of cross-site tracing (XST), in which script running in a victim's browser sent a TRACE request and read cookies or Authorization headers from the echoed response, bypassing the HttpOnly cookie attribute. Current browsers do not allow script to send TRACE requests, so this attack no longer works on its own, and theft of a user's cookies through cross-site tracing would need another weakness or an outdated client.
On its own, then, the method gives an attacker little. The remaining concern is that the echoed request shows headers added by intermediaries such as proxies, load balancers or web application firewalls, which can reveal internal IP addresses and host names, routing or authentication headers, the software in use and other identifying details of the infrastructure and, occasionally, credentials or tokens that those systems add. The finding mainly reflects a configuration that has not been hardened.
The method is identified by sending a TRACE request, for example with curl or the Nmap http-methods script, and checking for a successful response with the message/http content type that repeats the request. Requests for different host names and paths can reach different servers behind a proxy, each of which may respond differently.
Remediation
Disable the TRACE and TRACK methods on every server, proxy and load balancer that handles the application's traffic:
- Apache HTTP Server: set
TraceEnable Offin the server configuration. - IIS: deny the
TRACEandTRACKverbs with request filtering, as below. - Apache Tomcat: leave the connector's
allowTraceattribute at its default offalse. - nginx rejects
TRACErequests itself, but servers behind it, and any other route to them, should still be checked. - Check that load balancers, content delivery networks and web application firewalls neither answer nor forward
TRACE, and block it with a rule where they do.
Confirm the fix by sending a TRACE request to each host name that serves the application: each should be refused, typically with 405 or 403 (IIS request filtering answers 404), and should not repeat the request.
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.