Bypassing IE and Edge XSS Filters with Double Encoding

IE and Edge both uses a default XSS filter which is not powerful like the XSSAuditor(Webkit/Blink).
This is how the XSS filter is implemented.


Here’s a more detailed image.


In some websites urldecode() is being performed in the backend. Let’s imagine we have a PHP code snippet like this in the back end.

<?php print urldecode($_REQUEST ['name']); ?>

In these kinds of situations I found out that it’s easy bypass the XSS filter by performing double encoding to the filtered character or any valid character in the regex. Once our application decodes one level the XSS filter won’t find anything harmful in the encoded payload and the regex rules won’t apply.
The regular expressions or the filter rules can be found inside the “mshtml.dll” DLL. Let’s look at a few.

{[ /+\t\"\'`]{o}n\c\c\c+?[ +\t]*?=.}

In the above filter rule {o} will be filtered with the “#” neuter replacement character.


If we double encode the character “o” no longer the filter will apply.


You can see in the source our payload with no neuter replacements.

In Edge too this will apply decoding is being done in the back end server.

In Edge instead of () we can use “.


I have tested on the following versions.
Internet Explorer
Version : 11.0.9600.18378

Version: 20.10240.16384.0

4 thoughts on “Bypassing IE and Edge XSS Filters with Double Encoding

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.