Cross Domain Data Theft using CSS
July 21, 2010
FireFox (3.6.7) released today fixed an interesting security vulnerability called Cross Domain Data Theft using CSS discovered by Google security researcher Chris Evans.
It works kind of like JSON Hijacking, but uses a cross domain <link /> tag instead of a cross domain <script /> call to the attacker site.
Here's how it works:
- Post a comment on the victim site that looks like this:
{}body{background-image:url('http://google.com/- it can be anywhere on the page, doesn't need to be in astyletag or attribute. - Get the attacker to visit your site which contains a
linktag like this:<link rel="stylesheet" href="http://victimsite.example.com/page/with/above/css"> - The attacker site also includes some javascript calling
window.getComputedStyle(...)this can be used to steal the content of the page atvictimsite.example.com
The {} in the CSS resets the CSS parser because up to that point it is very confused (since it's trying to parse the HTML of the page as CSS).
To fix this issue Firefox (and WebKit) now reject loading CSS files that meet these conditions:
- CSS File is from another domain
- Content type is not text/css
- Page does not start with valid CSS syntax
You can find a lot of the interesting details here in this Firefox Bug Report.
Tweet
Related Entries
- Firefox Aurora now Supports Content Security Policy 1.0 - May 31, 2013
- Getting Started with jQuery Mobile - October 29, 2010
- Ajax Same Origin Policy No More with Firefox 3.5 - June 30, 2009
- Firefox 3.5 Introduces Origin Header, Security Features - June 30, 2009
- Geolocation API for Adobe AIR? - October 8, 2008
Trackbacks
Trackback Address: 757/6B9739E53C1C1DD8F91E5EB884656A89
Post a Comment
Spell Checker by Foundeo
Recent Entries
- Firefox Aurora now Supports Content Security Policy 1.0
- Writing Secure CFML cfObjective 2013 Slides
- Upgrading to Java 7 on Linux
- J2EE Sessions in CF10 Uses Secure Cookies
- Learn about ColdFusion Security at cfObjective 2013
- Session Loss and Session Fixation in ColdFusion
- FuseGuard 2.3 Released
- CKEditor Spell Checker Plugin


add to del.icio.us


