Yes and it happened years ago as a proof of concept with an mp3 file. This was one of the reasons that pushed Apple to update Mac OS X so that it warns the user when something (s)he tries to open, usually downloaded from internet, contains executable and potentially malicious code. I don't know if it is easy or not to bypass this kind of protection. However, the open "safe files" option is still there in Safari activated by default. This is beyond logic today.
5/27/11 at 7:02am