ArrowChat External.php lang parameter traversal local suffers from file inclusion vulnerability.
Credit:
The information has been provided by kallimero .
Vulnerable Systems:
* ArrowChat 1.5.61
ArrowChat contains a flaw that allows an attacker to traverse outside of a restricted path. The issue is due to the external.php script not properly sanitizing user input, specifically directory traversal style attacks (e.g., ../../) supplied via the 'lang' parameter. This directory traversal attack would allow a local attacker to include arbitrary files.
PoC:
http://
[site]/[path]/admin/layout/pages_general.php/'"/>
How to Fix ?
-===========
To fix the LFI, you can replace it with :
// Load another language if lang GET value is set and exists
if (var_check('lang'))
{
$lang = get_var('lang');
if(preg_match("#^[a-z]{2,5}$#i", $lang)){
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php"))
{
include (dirname(__FILE__) . DIRECTORY_SEPARATOR .
AC_FOLDER_LANGUAGE . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR .
$lang . ".php");
}
}
}
lang will be include only if it's a valid lang file.
For the XSS's, you can use a .htaccess to protect the layout directory,
and use htmlentities to avoid the html inj'.
Disclosure Timeline:
Disclosure Date :2013-02-02
Exploit Publish Date :2013-02-02
Please enable JavaScript to view the comments powered by Disqus.
blog comments powered by