The vulnerability exists in the gif_outputAsJpeg function within the phpthumb.gif.php file. The patch cdcbc206ae601b15fd17e7aadf59df51149a0e82 clearly shows that the exec call was modified to include escapeshellarg for the $lpszFileName parameter. This indicates that the original code was vulnerable to command injection. The vulnerable function takes a filename as input and uses it to construct a shell command. Without proper escaping, a malicious actor could provide a specially crafted filename that includes shell metacharacters to execute arbitrary commands on the underlying operating system. The fix involves using escapeshellarg to ensure that the filename is treated as a single, safe argument, thus preventing the command injection.