You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ext_in upload validation rule checked the MIME-derived guessed extension instead of the client-provided filename extension. As a result, an uploaded file named shell.php containing GIF-like content could pass validation such as:
Impact
The
ext_inupload validation rule checked the MIME-derived guessed extension instead of the client-provided filename extension. As a result, an uploaded file namedshell.phpcontaining GIF-like content could pass validation such as:because the detected MIME type maps to
gif, even though the uploaded filename extension isphp.Applications are impacted if they:
ext_into validate the uploaded filename extension,$file->move($path),In those conditions, this may lead to arbitrary code execution. The default application does not expose such an upload endpoint.
Patches
Upgrade to v4.7.3 or later.
Workarounds
writable/uploads$file->store()or$file->move($path, $file->getRandomName())instead of preserving the original filename$file->getClientExtension()is not in the allowed list or does not match$file->guessExtension()References