What does this mean?
The application serves CSRF tokens in the document body but lack an X-Frame-Options header.

What can happen?
A third party domain may define an iframe element to the vulnerable URL and extract CSRF tokens using the view-source psuedo scheme.

Description
It's possible to extract the CSRF token in Mozilla Firefox by creating an iframe on another domain, pointing the 'src' attribute to 'view-source:https://mytracker.com/account-login.php'. The attacker can then use CSS to zoom in on individual pixels in the iframe and hence, extracting the token by applying a heavy rendering filter. The timing difference created by the filter will differ from frame to frame which opens up for a side channel. You should consider setting up an appropriate X-Frame-Options header to mitigate the issue.

Solution

Add to .htaccess (Apache):
Header append X-Frame-Options: "SAMEORIGIN"

Add to nginx.conf (NGINX, after server):
add_header X-Frame-Options "SAMEORIGIN";


Effects any version or modification that allows the use of CSRF tokens in TT. Restart httpd and verify changes:

https://geekflare.com/tools/x-frame-options-test
Last edited by STorrents2020 on 2022-12-29 21:09:24