CVE-2021-28677: Input Validation
A flaw was found in python-pillow. 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.
Other sources
An issue was discovered in Pillow before 8.2.0. For EPS data, the readline implementation used in EPSImageFile has to deal with any combination of \r and \n as line endings. It used an accidentally quadratic method of accumulating lines while looking for a line ending. A malicious EPS file could use this to perform a DoS of Pillow in the open phase, before an image was accepted for opening.
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.
References: https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#security https://github.com/python-pillow/Pillow/pull/5377
— Red Hat
Affected Software
Remediation
Patch Available
Information
Event History
Frequently Asked Questions
What is CVE-2021-28677?
CVE-2021-28677 is a vulnerability found in python-pillow, a library used for handling EPS data.
What is the severity of CVE-2021-28677?
CVE-2021-28677 has a severity rating of high (7).
How does CVE-2021-28677 affect python-pillow?
CVE-2021-28677 affects python-pillow versions 0:5.1.1-16.el8 up to, but excluding, 8.2.0.
How can I fix CVE-2021-28677?
To fix CVE-2021-28677, upgrade python-pillow to version 8.2.0 or higher.
Where can I find more information about CVE-2021-28677?
You can find more information about CVE-2021-28677 on CVE.org (https://www.cve.org/CVERecord?id=CVE-2021-28677) and NVD (https://nvd.nist.gov/vuln/detail/CVE-2021-28677).