5.8's imapfilter is version 2.6.1. This commit is the only change between that and 2.6.2:
https://github.com/lefcha/imapfilter/commit/0526dee062c28257a14f2ed7afca49a9a384e4aa Definitely security-relevant, but I'm not sure how bad bugs need to be to warrant backporting. The -current version is 2.6.3. Should it be committed to 5.8?