tags:

views:

69

answers:

3

We have some code that removes "dangerous" attributes and tags from HTML. I noticed that style is among the list of "dangerous" attributes. What could be the risk from that attribute?

+2  A: 

In IE you can include @behaviors in there which can load little Javascripts.

With CSS3 you can also interject little bits of text, which could be dangerous depending on your website.

Kevin Sedgley
+1  A: 

Here's an example of a bug in MediaWiki that creates a vulnerability based on inline style attributes.

JacobM
+1  A: 

It's possible to make things that are invisible or otherwise very deceptive using style sheets. For example, you could put a giant, invisible anchor link over the whole page so that when the user clicks on something, he's taken to an identical page on a server in Russia.

Chuck