[cowiki-dev] [[email protected]: XSS Vulnerability.]

"Daniel T. Gorski" <[email protected]> Thu, 7 Jul 2005 20:23:02 +0200
Newsgroups gmane.comp.php.cowiki.devel
Message-ID <20050707182302.GW13654@bantha>
----- Forwarded message from David Coallier <[email protected]> -----

From: David Coallier <[email protected]>
To: [email protected]
CC: [email protected]
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
Date: Thu, 07 Jul 2005 12:22:59 -0400
Subject: XSS Vulnerability.

Since wikis are really important and widely spread in todays world, the 
reputation of an application and it's security is something that matters 
to many people. I notice that the search field is failing to process the 
basic user input rules[1].

http://cowiki.org/?cmd=srchdoc&q="><script>window.location='http://phpsec.org'</script>&x=0&y=0
http://develnet.org/?cmd=srchdoc&q=%22%3E%3Cscript%3Ealert%28document.cookie%29%3B%3C%2Fscript%3E&x=0&y=0

"><script>window.location='http://phpsec.org'</script>
"><script>alert(document.cookie);</script>


This is not too serious but thought it might be a good thing for you to 
know about it.

I noticed that it entitied it for the displaying on the page, but this 
also appears in the form which is where is it not escaped.

P.S. This is just an example, I also prefer to use Firefox for my cookies :)

[1]: http://www.phpsec.org/projects/guide/2.html#2.3

-- 
David Coallier               T: 800-361-1388 x145
PHP Developer -
PHP Security Consortium (http://www.phpsec.org)
Looking forward to make this world a safer place.

----- End forwarded message -----