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)

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 :

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.