Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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