[gratipay.com] Cross Site Tracing
The server responded to HTTP TRACE requests with a redirect rather than rejecting the method, and the reporter claimed this enables Cross Site Tracing. An attacker could potentially inject headers into the response, though the report does not demonstrate a working exploit.
- Disclosed after 13 months
Hello team,
I was checking if TRACE method is enabled on gratipay.com or not? I opened up my terminal (CLI) and executed this command: curl -v -X TRACE http://gratipay.com
The response may not actually shows it is vulnerable, but it is not as well a message for properly configured "no" to Cross Site Tracing attack.
And it showed up this response:
* Trying 54.235.170.226...
* Connected to gratipay.com (54.235.170.226) port 80 (#0)
> TRACE / HTTP/1.1
> Host: gratipay.com
> User-Agent: curl/7.49.1
> Accept: */*
>
< HTTP/1.1 302 Found
< Server: gunicorn
< Date: Thu, 21 Jul 2016 09:15:54 GMT
< X-Frame-Options: SAMEORIGIN
< Cache-Control: no-cache
< X-Xss-Protection: 1; mode=block
< Location: https://gratipay.com/
< X-Content-Type-Options: nosniff
< X-Gratipay-Version: 1977
< Via: 1.1 vegur
< X-Cache: MISS from cache1
< X-Cache-Lookup: NONE from cache1:8080
< Transfer-Encoding: chunked
< Connection: keep-alive
<
* Connection #0 to host gratipay.com left intact
While, it should show this error
<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx</center>
</body>
</html>
##PoC We can inject headers in the response:
Command: curl -v -X TRACE -H "Header: value=Testing" http://gratipay.com/
Response:
* Trying 54.235.170.226...
* Connected to gratipay.com (54.235.170.226) port 80 (#0)
> TRACE / HTTP/1.1
> Host: gratipay.com
> User-Agent: curl/7.49.1
> Accept: */*
> Header: value=Testing --> *** YOU CAN SEE HEADER INJECTED***
>
< HTTP/1.1 302 Found
< Server: gunicorn
< Date: Thu, 21 Jul 2016 09:17:01 GMT
< X-Frame-Options: SAMEORIGIN
< Cache-Control: no-cache
< X-Xss-Protection: 1; mode=block
< Location: https://gratipay.com/
< X-Content-Type-Options: nosniff
< X-Gratipay-Version: 1977
< Via: 1.1 vegur
< X-Cache: MISS from cache1
< X-Cache-Lookup: NONE from cache1:8080
< Transfer-Encoding: chunked
< Connection: keep-alive
<
* Connection #0 to host gratipay.com left intact
For more information: https://www.owasp.org/index.php/Cross_Site_Tracing
Cheers, Ahsan
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server or its proxy did not explicitly disable the TRACE method, allowing it to be processed instead of rejected.
Impact
The report claims header injection is possible, but the response shown is a redirect and does not clearly echo the request, so the practical impact is unproven.
What the attacker needed
None
The fix
The server should be configured to reject TRACE requests with a 405 Method Not Allowed response.
How it was found
- Send a TRACE request to the target using curl.
- Observe that the server responds with a redirect instead of a 405 error.
- Send a TRACE request with a custom header.
- Observe that the custom header appears in the echoed request.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
HTTP has different methods like GET and POST; TRACE is a diagnostic method that echoes back whatever the client sends. If a server allows TRACE, an attacker might trick a browser into sending a request and then read the echoed data, which could include sensitive headers. This report shows the server did not return a '405 Not Allowed' error, but it also did not clearly show the echoed request.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.