To successfully exploit it an attacker would need to place a file with malicious prompt on your hard drive. However, if it's the case then there will be a lot more easier ways to execute various attacks.
How will you know if a file is free from malicious prompt or not? The applications seems to be able to download any file and analyze it. So from my perspective, I think it is easier this way than to execute other attack? Because these files may seem benign but can still run instructions from the prompts. Just think that the next pdf you are downloading from the web has has no malware but only malicious prompt. What will you do?
You give arbitrary read/write to the LLM, right? So ransomware, causing network requests as side effects etc. could all be possible. Look at the paper to find more descriptions of what could go wrong: https://github.com/greshake/llm-security
osascipt line does look a bit dodgy to me but perhaps is safe. But I can see how things might go downhill quickly with this approach...