A flaw was found in mbsync before v1.3.5 and v1.4.1. Validations of the mailbox names returned by IMAP LIST/LSUB do not occur allowing a malicious or compromised server to use specially crafted mailbox names containing '..' path components to access data outside the designated mailbox on the opposite end of the synchronization channel. The highest threat from this vulnerability is to data confidentiality and integrity.
https://www.openwall.com/lists/oss-security/2021/02/22/1
https://security.gentoo.org/glsa/202208-15
https://lists.debian.org/debian-lts-announce/2022/07/msg00001.html