in reply to Re: running an executable from a cgi script
in thread running an executable from a cgi script

CGI is insecure if you use input from the user to pass into a program. For example:

Insecure CGI example: print "Enter a command to execute:" my $command = <STDIN>; system($command); # BAD! User enters 'rm -fR *' !!!

However, in your code above, you are not taking any input. You are simply executing a program and supplying it with a file. Based on your snippet, you would do this exact same thing at a command line. You aren't giving the user any choice of what to do.

CGI can also be dangerous is you allow someone to job off processes on your machines, like you are doing above. Is this a heavy duty process? If a user bounces on the refresh button, can they start a whole lot of these jobs, and eat up system resources causing poor performance and possibly a crash? That's a problem too. Have you dealt with that in your script?