CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths.
The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged.
An application that saves the upload under this name can be made to write outside the intended directory.
For deployments that cannot upgrade, do not use the client-supplied upload filename as a path.
Upgrade to CGI 5.00 or later.