WordPress User Photo Component Remote File Upload Vulnerability
When a photo is uploaded, it is only partially validated and it is possible to upload a backdoor on the server hosting WordPress. This backdoor can be called (executed) even if the photo has not been yet approved. When a file is uploaded, its type is validated. Only the following types are accepted: image/jpeg, image/pjpeg, image/gif, image/png, image/x-png. The type is validated by verifying the MIME type of the uploaded file. A navigator infers the MIME type from the file itself or from its extension but it is possible to intercept the HTTP request and change it (using a proxy such as WebScarab). This way, any file can be uploaded as if it were an image. When a photo (an image) is uploaded, its size is checked. If it is too big, it is resized. To avoid this resizing, the uploaded file has to look like a small image.