Skip to content
XSS Disclosed report Beginner

Weak HSTS age

The site sent a Strict-Transport-Security header with a max-age of zero, which tells browsers to discard any stored HSTS policy rather than enforce HTTPS. An attacker able to intercept traffic could then downgrade the connection to plain HTTP without the browser objecting.

ketankumar_godhani Follow

Originally disclosed on HackerOne

  • Triaged in 18 hours
  • Fixed in 12 days
  • Disclosed after 19 days

Send this request:

https://www.fantasytote.com/login

GET /login HTTP/1.1 Host: www.fantasytote.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Cookie: __cfduid=d8a2061ca9ed456b3696715a5f068a5731466869224; _session_id=838eb8d660cd138f1b7fab029187cc9a; _ga=GA1.2.321412493.1466869396; _gu=732e6098-8746-4c7d-be39-fd7fb86290d3; _gw=2.69166(sc7,so9c97z)u[~0,~0,~0,~0,~0]v[~ek05j,~5,~1]a(); _gs=2.s(src=https://www.fantasytote.com/login); _gat=1 Connection: keep-alive

HTTP/1.1 200 OK Date: Sat, 25 Jun 2016 17:50:24 GMT Content-Type: text/html; charset=utf-8 Connection: close X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Cache-Control: no-cache, no-store, private, must-revalidate, max-age=0, max-stale=0, post-check=0, pre-check=0 surrogate-control: max-age: 0 Pragma: no-cache Expires: 0 Vary: * Set-Cookie: _session_id=8b128154bdaf0790aa1120cc4f5d8b4e; path=/; expires=Mon, 27 Jun 2016 17:50:24 -0000; secure; HttpOnly x-request-id: 72a13e25-b3fb-4a60-9260-c2e9c9ef373b x-runtime: 0.045696 Strict-Transport-Security: max-age=0; includeSubDomains; preload x-ua-compatible: IE=Edge,chrome=1 Server: cloudflare-nginx cf-ray: 2b8a42f9e2122dcd-BOM Content-Length: 27864

==>>Strict-Transport-Security: max-age=0 ==>> Directs the browser to delete the entire HSTS policy.

https://blog.qualys.com/securitylabs/2016/03/28/the-importance-of-a-proper-http-strict-transport-security-implementation-on-your-web-server

The original report as published on HackerOne, by ketankumar_godhani. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 a misconfigured HSTS header where max-age was set to 0 instead of a long duration, disabling the policy entirely.

What the attacker needed

None stated in the report

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.

HSTS is a header a website sends to tell your browser 'always use the secure HTTPS version of me, even if I link to plain HTTP'. The max-age value says how long the browser should remember that rule; setting it to zero means 'forget it immediately', so the protection is effectively switched off.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from FantasyTote

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.