2

I created a Wordpress theme for my client. He told me that he scanned my theme with a vulnerability scanner, and that it has security issues with the GET and windows.location methods. Is this really insecure? How can I fix this? The errors look like:

Risk Factor:

Medium / CVSS Base Score : 4.3(CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N)

Output:
Using the GET HTTP method, the scanner found that:

+ The following resources may be vulnerable to cross-site scripting (quick test) :
+ The 'product_quantity' parameter of the /pink-drool-proof-bib/ CGI :
/pink-drool-proof-bib/?product_quantity=--><script>alert(112)</script>
Thanks

1 Answer 1

2

If you have created a pure Wordpress theme (so only CSS) then normally there should be no issues. The problem is that the GET parameter product_quantity is directly shown into the page without properly sanitizing the output. This means that when you put JavaScript within the parameter, it will be loaded into the page (as it's shown) and it will execute the script.

Now if you use the windows.location to display variables in your webpage, it can very well be that you do not sanitize these before outputting them, hence making your page vulnerable to XSS.

You can read more at OWASP.

3
  • Thanks for the reply. So how can i sanitize output ? Jun 25, 2013 at 12:34
  • 1
    Please read the link I provided it's all detailed in there. Jun 25, 2013 at 12:45
  • ok i will read it and try to find solution. Thanks Jun 26, 2013 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .