Xpdf prior to version 4.04 contains an integer overflow in the JBIG2 decoder (JBIG2Stream::readTextRegionSeg() in JBIG2Stream.cc). Processing a specially crafted PDF file or JBIG2 image could lead to a crash or the execution of arbitrary code. This is similar to the vulnerability described by CVE-2021-30860 (Apple CoreGraphics).
https://www.cve.org/CVERecord?id=CVE-2021-30860
https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html
https://github.com/zmanion/Vulnerabilities/blob/main/CVE-2022-38171.md
https://github.com/jeffssh/CVE-2021-30860
https://dl.xpdfreader.com/xpdf-4.04.tar.gz