Actual images will not contain code. But nothing prevents someone from trying to download the downloaded "image" file, and then trying to get it to execute.
Your interpreters (Perl, PHP, independently) should be configured so that they only execute certain types of files (i.e...php or .php5). There is no reason Perl or PHP should process image files.
Just use the following common sense to protect yourself:
1) Check the mime type of the document
2) Forced policies that allow you to upload files of a specific extension
3) Do not accept file names at face value. Create your own internal file name and use the database table to maintain the mapping.
4) If you are really paranoid, find the code to verify that byte signatures are valid for a given file type download.
gnxtech3
source share