Bug: cyask 3.x Local File Inclusion Vulnerability ( Ascii Version )

Search:
WLB2

cyask 3.x Local File Inclusion Vulnerability

Published
Credit
Risk
2008.09.25
xuanmumu gmail com
Medium
CWE
CVE
Local
Remote
CWE-22
CVE-2008-4151
No
Yes

CVSS Base Score
Impact Subscore
Exploitability Subscore
5/10
2.9/10
10/10
Exploit range
Attack complexity
Authentication
Remote
Low
No required
Confidentiality impact
Integrity impact
Availability impact
Partial
None
None

This vulnerability leads to that the attacker can read any file on your webserver when it installs cyask.

The $neturl variable in collect.php is short of enough check. When the attacker registers a new user, he can pass the
user check and then submit any filename to $neturl so that collect.php can read it.

The vuln code like this:

$url=get_referer();

$neturl=empty($_POST['neturl']) ? trim($_GET['neturl']) : trim($_POST['neturl']);

$collect_url=empty($neturl) ? $url : $neturl;

$contents = '';

if($fid=@fopen($collect_url,"r"))

{

do

{

$data = fread($fid, 4096);

if (strlen($data) == 0)

{

break;

}

$contents .= $data;

}

while(true);

fclose($fid);

}

POC:

http://XXX.com/collect.php?net_url=../../../etc/passwd

References:

http://www.securityfocus.com/archive/1/archive/1/496511/100/0/threaded
http://www.milw0rm.com/exploits/6487

See this note in TXT Version

Bugtraq RSS
Bugtraq
 
REDDIT
REDDIT
 
DIGG
DIGG
 
LinkedIn
LinkedIn
 
CVE RSS
CVEMAP

Copyright 2014, cxsecurity.com
Ascii Version