In ssh in OpenSSH before 9.6, OS command injection might occur if a user name or host name has shell metacharacters, and this name is referenced by an expansion token in certain situations. For example, an untrusted Git repository can have a submodule with shell metacharacters in a user name or host name.
https://www.debian.org/security/2023/dsa-5586
https://security.gentoo.org/glsa/202312-17
https://lists.debian.org/debian-lts-announce/2023/12/msg00017.html
https://www.cisa.gov/news-events/ics-advisories/icsa-25-044-09
https://securelist.com/exploits-and-vulnerabilities-q3-2024/114839/