PT-2012-27: Privilege Gaining in UMI.CMS Vulnerable softwareUMI.CMS Version: 2.8.5.2 and earlierApplication link: http://www.umi-cms.ru/Severity levelSeverity level: High Impact: Administrator Privilege Gaining Access Vector: Remote CVSS v2: Base Score: 10 Vector: (AV:N/AC:L/Au:N/C:C/I:C/A:C)CVE: not assigned Software descriptionUMI.CMS is a system that allows users to manage sites.Vulnerability descriptionPositive Research Center experts detected a vulnerability that exists as confirmation code (that is used to reset passwords for all accounts including administrator account) and new generated passwords are predictable.Vulnerable code: classes/modules/users/__forget.php$avLetters = "$#@^&!1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"; $size = strlen($avLetters); $npass = ""; for($i = 0; $i < $length; $i++) { $c = rand(0, $size - 1); $npass .= $avLetters[$c]; }You need to know user login if you want to reset its password. An attacker can easily check if the login exists, if he tries to register with the login (error-login-exists error class). It is possible because UMI.CMS gets random numbers via PHP function rand, and does not initialize the random number generator via srand function called with SEED parameter. In this case, PHP automatically calls srand function with predictable SEED based on session number that allows attackers to predict every further result of rand function call. Also in Windows this code provides only 2^15 possible values of generated tokens.How to fixUpdate your software up to the latest version.Advisory status16.08.2012 - Vendor is notified 17.08.2012 - Vendor gets vulnerability details 20.11.2012 - Vendor releases fixed version and details 11.02.2013 - Public disclosureCreditsThe vulnerabilities has discovered by Timur Yunusov, Positive Research Center (Positive Technologies Company)Referenceshttp://en.securitylab.ru/lab/PT-2012-27 Reports on the vulnerabilities previously discovered by Positive Research:http://ptsecurity.com/research/advisory/ http://en.securitylab.ru/lab/