Possible bug in XSS filter

Ask for help about NoScript, no registration needed to post
PassingThrough

Possible bug in XSS filter

Post by PassingThrough »

It seems that the XSS filter replaces all brackets "(" and ")" with %20 instead of %28 and %29. Is this an intended/necessary switch?

Sample console output:

[NoScript XSS] Sanitized suspicious request.
Original URL [http://msdn.microsoft.com/query/dev10.q ... P)&rd=true] requested from [chrome://browser/content/browser.xul].
Sanitized URL: [http://msdn.microsoft.com/query/dev10.q ... 9468807261].
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Possible bug in XSS filter

Post by Giorgio Maone »

No, not all the brackets.
Just those which occurs in URLs which contain syntactically valid JavaScript fragments and are requested cross-site (or 1st request).
Notice that a "syntactically valid" JavaScript fragment doesn't necessarily executes as JavaScript, but it does compile as such and it's the best you can check to say "this is JavaScript" without actually executing.
Your request, unfortunately, passes the test.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
PassingThrough

Re: Possible bug in XSS filter

Post by PassingThrough »

Just to get this straight. NoScript checks cross-site URLs for valid JavaScript fragments. It then disables URLs which meet the criteria by replacing all brackets in them with spaces. Is that accurate?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Possible bug in XSS filter

Post by Giorgio Maone »

PassingThrough wrote:Just to get this straight. NoScript checks cross-site URLs for valid JavaScript fragments.
And for "dangerous" HTML fragments as well.
PassingThrough wrote:It then disables URLs which meet the criteria by replacing all brackets in them with spaces.
It performs some replacements to neutralize the payload, including the one you described.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Post Reply