uploadimg.php in the Expose RC35 and earlier (com_expose) component for Joomla! sends an error message but does not exit when it detects an attempt to upload a non-JPEG file, which allows remote attackers to upload and execute arbitrary PHP code in the img/ folder.
https://www.exploit-db.com/exploits/4194
https://exchange.xforce.ibmcloud.com/vulnerabilities/35488
http://www.securityfocus.com/bid/24958
http://www.attrition.org/pipermail/vim/2007-July/001717.html