cyask 3.x Local File Inclusion Vulnerability

2008-09-24 / 2008-09-25
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-22


CVSS Base Score: 5/10
Impact Subscore: 2.9/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: None
Availability impact: 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


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top