In imap_scan_tree_recursive in Claws Mail through 3.17.6, a malicious IMAP server can trigger stack consumption because of unlimited recursion into subdirectories during a rebuild of the folder tree.
https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4313