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.
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.