The JPXStream::init function in Poppler 0.78.0 and earlier doesn't check for negative values of stream length, leading to an Integer Overflow, thereby making it possible to allocate a large memory chunk on the heap, with a size controlled by an attacker, as demonstrated by pdftocairo.
https://lists.debian.org/debian-lts-announce/2022/09/msg00030.html
https://lists.debian.org/debian-lts-announce/2020/11/msg00014.html
https://lists.debian.org/debian-lts-announce/2019/10/msg00024.html
https://gitlab.freedesktop.org/poppler/poppler/blob/master/NEWS