I’ve been hacking the PHPIDS recently and I wanted a pure XSS vector not just script execution, I decided to experiment with the applet tag because it sneaks past the malicious tag detection. I thought to myself I wonder if it accepts the type attribute like the object tag does….
<applet src="data:text/html;base64,PHNjcmlwdD5hbGVydCgvWFNTLyk8L3N jcmlwdD4" type=text/html>
That works it executes the base64 encoded string as HTML! It doesn’t stop there though
<applet src="http://www.businessinfo.co.uk" type=text/html>
The applet tag even acts like a iframe ![]()




Comments 13
hey man, nice find.
Posted 20 May 2008 at 10:49 am ¶@ehmo
Thx, it was fun to find
Posted 20 May 2008 at 11:17 am ¶Here’s a shortened XSS vector:-
Posted 20 May 2008 at 12:07 pm ¶<applet/src/type=text/html onload=alert(1)
My only issue would be sites that use strict XHTML, this would be rendered useless, no?
Posted 20 May 2008 at 12:50 pm ¶@daniel
I ran a test in strict html and it still seemed to work
Posted 20 May 2008 at 12:56 pm ¶interesting, damn good find then sir!
Posted 20 May 2008 at 1:37 pm ¶Which version of Firefox did you use ? I tried it with Firefox 3 RC1 and it didn’t work.
Posted 20 May 2008 at 2:47 pm ¶@Alex
Not tried with beta but it works with latest FF2
Posted 20 May 2008 at 2:50 pm ¶I’ve tested it with the latest FF2. Now it works.
Posted 20 May 2008 at 6:50 pm ¶It’s time to try accessing any property or value from outside that “iframe”. Maybe we can bypass the same origin policy and steal userinput from within this “iframe”.
@Alex
Yeah I thought that might be possible but it appears that the properties can’t be accessed using “this” and the frames array. However if you can prove me wrong then I’d be very interested on how to do it
Posted 20 May 2008 at 6:57 pm ¶I’ve tried some code to access data from within this “iframe”, but you’re right so far. ’til now I didn’t manage to get around the protection.
Posted 20 May 2008 at 10:16 pm ¶Nice stuff Gareth - finally a “real” XSS again
Has been a pretty long time. The issues are fixed in the trunk - 0.4.8 as soon as I return from OWASP Europe.
Posted 21 May 2008 at 9:19 am ¶@.mario
Thx, I knew about the applet tag insert for a while but I didn’t think it was exploitable. It was good fun to find
good luck with the conference
Posted 21 May 2008 at 9:59 am ¶Post a Comment