SugarCRM 5.2.0e Remote Code Execution
A Remote Code Execution Vulnerability exists in SugarCRM software. The vulnerability resides in the "Compose Email" section. The software permits sending email with attachments (if not disabled by the administrator). When the name of the file is specified, a validation routine is called. The "upload_badext" array contains a list of file extensions that are not allowed to be uploaded. The problem is that the validation routine does not check the content of the file, only the extension. The attacker can upload a file with a malicious extension (for example ".php") and then rename it to a valid extension (for example ".txt"). The file will be uploaded and the attacker can execute it by accessing the URL.