The readline used in EPS has to deal with any combination of \r and \n as line endings. It accidentally used a quadratic method of accumulating lines while looking for a line ending. A malicious EPS file could use this to perform a denial-of-service of Pillow in the open phase, before an image was accepted for opening. This dates to the PIL fork.
Created mingw-python-pillow tracking bugs for this issue:
Affects: fedora-all [bug 1958261]
Created python-pillow tracking bugs for this issue:
Affects: fedora-all [bug 1958259]
Created python2-pillow tracking bugs for this issue:
Affects: fedora-all [bug 1958258]
Created python3-pillow tracking bugs for this issue:
Affects: epel-7 [bug 1958260]
To mitigate this feature on Red Hat Quay keep the invoice generation feature disabled, as it is by default.
This issue has been addressed in the following products:
Red Hat Enterprise Linux 8
Via RHSA-2021:4149 https://access.redhat.com/errata/RHSA-2021:4149
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):