[INVALID] Twitter.com/twimg.com: got a script past NoScript
Posted: Sat Nov 02, 2013 4:37 pm
Loaded twitter.com and it managed to get (an obnoxious) script executed.
Env:
- Firefox 25 on Ubuntu 12.04, recently updated from package system. NoScript is, and has been, installed from mozilla extensions system, for years; current version 2.6.8.4.
- NoScript options are default, a small set of domains are allowed but NOT twitter.com or twimg.com.
- Firefox running with (currently) 14 windows, each with many tabs; FFox is restarted only as needed, that is, rarely; session restore is used.
Event:
- I do not think I had *ever* visited twitter.com before
- Entered twitter.com in address bar, page loaded -- with warning that twitter uses heavy JS
- After a few seconds a new rectangle with text and a button appeared at upper right corner: the delay surprised me since scripts should be blocked.
- Next I found that the same new elements that appeared on the twitter page were present in *every* firefox window, only on the foreground (selected) tab.
- Checked "view source" vs. "view generated source": the last element delivered with the page -- *after* -- is a script with the async attribute:
appear that contain the elements that appear in the upper right corner.
- Saved page with FFox right-click "Save page as": in *_files directory, found init.js, exactly same as wget of script URL quoted above, size 319843 bytes.
Clearly, Twitter got a script past NoScript, made it execute and get those elements added to DOM; as for their appearance in all windows, that seems *really* bad -- certainly not the behavior I want to see in my browser. I mentioned above a few seconds delay -- which could be trivially implemented on the server -- could this delay along with the async attribute exploit a timing hole?
I assume that this is something NoScript would want to prevent; I hope it will in the future.
-- Ed
Env:
- Firefox 25 on Ubuntu 12.04, recently updated from package system. NoScript is, and has been, installed from mozilla extensions system, for years; current version 2.6.8.4.
- NoScript options are default, a small set of domains are allowed but NOT twitter.com or twimg.com.
- Firefox running with (currently) 14 windows, each with many tabs; FFox is restarted only as needed, that is, rarely; session restore is used.
Event:
- I do not think I had *ever* visited twitter.com before
- Entered twitter.com in address bar, page loaded -- with warning that twitter uses heavy JS
- After a few seconds a new rectangle with text and a button appeared at upper right corner: the delay surprised me since scripts should be blocked.
- Next I found that the same new elements that appeared on the twitter page were present in *every* firefox window, only on the foreground (selected) tab.
- Checked "view source" vs. "view generated source": the last element delivered with the page -- *after*
Code: Select all
</html>- In 'generated' source, after that script element, a set ofCode: Select all
<script src="https://abs.twimg.com/c/swift/en/init.4119a754be6560a20b7bca78e45c729dfae6dbb1.js" async></script>
Code: Select all
<div>- Saved page with FFox right-click "Save page as": in *_files directory, found init.js, exactly same as wget of script URL quoted above, size 319843 bytes.
Clearly, Twitter got a script past NoScript, made it execute and get those elements added to DOM; as for their appearance in all windows, that seems *really* bad -- certainly not the behavior I want to see in my browser. I mentioned above a few seconds delay -- which could be trivially implemented on the server -- could this delay along with the async attribute exploit a timing hole?
I assume that this is something NoScript would want to prevent; I hope it will in the future.
-- Ed