In zsh before 5.8.1, an attacker can achieve code execution if they control a command output inside the prompt, as demonstrated by a %F argument. This occurs because of recursive PROMPT_SUBST expansion.
https://support.apple.com/en-us/HT213256
https://support.apple.com/en-us/102770
https://zsh.sourceforge.io/releases.html
https://www.debian.org/security/2022/dsa-5078
https://vuln.ryotak.me/advisories/63
https://support.apple.com/kb/HT213257
https://support.apple.com/kb/HT213256
https://support.apple.com/kb/HT213255
https://lists.debian.org/debian-lts-announce/2022/02/msg00020.html
http://seclists.org/fulldisclosure/2022/May/38