vendor:
MetaForum
by:
Gu1ll4um3r0m41n
5.5
CVSS
MEDIUM
Remote file upload
CWE
Product Name: MetaForum
Affected Version From: 0.513 Beta
Affected Version To: 0.513 Beta
Patch Exists: NO
Related CWE:
CPE:
Platforms Tested:
2007
MetaForum <= 0.513 Beta - Remote file upload Vulnerability
A security bug has been discovered in MetaForum 0.513 Beta. This bug can be used by an attacker to upload a malicious php file on the server. During the upload, the MIME type of the file is the only verified parameter. The extension isn't. This enables an attacker to fake the MIME type of a php file so that it is considered as an image.
Mitigation:
Replace line 110 in the file usercp.php by: if (($_FILES['imagefile']['type'] == "image/jpeg" || $_FILES['imagefile']['type'] == "image/pjpeg" || $_FILES['imagefile']['type'] == "image/png" || $_FILES['imagefile']['type'] == "image/gif") && in_array(strtolower(substr(strrchr($_FILES['imagefile']['name'], '.'),1)), array('gif', 'jpg', 'jpeg', 'png')))