Skip to content
Info disclosure Disclosed report Intermediate CVE-2022-29915

Detecting cross-origin redirects using the performance API

A timing side channel in Firefox's performance API lets a page tell whether a cross-origin URL redirects, by comparing fetchStart and startTime for a resource entry. An attacker could use this to learn redirect behaviour of cross-origin URLs, which is normally hidden by the same-origin policy.

Sohom Datta Follow

Originally disclosed on Mozilla

  • Fixed in 54 days
  • Paid in 57 days
  • Disclosed after 54 days
Text
Created attachment 9260357
index.html

Found this while digging around while reporting a similar bug in Chrome. When advanced tracking protection is turned off, we can detect whether or not a cross-origin URL is a redirect using the difference of `performance.getEntriesByName(...)[0].fetchStart - performance.getEntriesByName(...)[0].startTime`. 

Reproduction steps:
1) Download the attached index.html file.
2) Run a python HTTP server by running `python -m http.server` in the same directory as the index.html file.
3) Open http://localhost:8000/index.html in Firefox
4) Open the javascript console
5) https://google.com should be correctly identified as a redirect, whereas, https://www.google.com should be identified as a URL without a redirect.

The original report as published on Mozilla's Bugzilla, by Sohom Datta. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 performance timing entries expose a measurable gap between fetchStart and startTime for cross-origin redirects, revealing redirect behaviour that should be hidden.

Impact

A page could learn whether cross-origin URLs redirect, a small information leak that may help fingerprinting or tracking; the text notes the behaviour appears when advanced tracking protection is off.

What the attacker needed

Firefox browser; advanced tracking protection off; attacker-controlled web page

How it was found

  1. Download the attached test page.
  2. Serve it locally with a simple Python HTTP server.
  3. Open the page in Firefox.
  4. Open the JavaScript console.
  5. Observe that one URL is flagged as a redirect and another is not.

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.

Browsers normally stop one website from reading details about another website's pages. Here, a page can measure tiny timing differences in how a resource loaded and use them to guess whether the other site's URL redirected somewhere else. That leaks a small piece of information that should have stayed private.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Sohom Datta

View all

1 more disclosed report, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.