CubeCart is an "out of the box" ecommerce shopping cart software solution which has been written to run on servers that have PHP &
MySQL support. With CubeCart you can quickly setup a powerful online store which can be used to sell digital or tangible products to new and existing customers all over the world.
CubeCart 5.0.7 and lower versions contain a flaw that insecurely backs up the configuration file, "global.inc.php", upon new installation or
upgrade process. The name of backup configuration file is set to the year, month, day, hour, minute that the process is performed. The non-randomized nature of this backup scheme allows an attacker to retrieve the file through brute-force method.
///////////CODE //////////////
##Backup existing config file, if it exists
if (file_exists($global_file)) {
rename($global_file, $global_file.'-'.date('Ymdgi'));
}
/////////////////////////
e.g.
http://127.0.0.1/cube507/includes/global.inc.php-2012021245719