CVE-2021-28677Python Pillow
High 7.5 No auth needed
Follow: this CVE · Python · Python Pillow We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 2.5% probability of exploitation in 30 days · percentile 85
- Auth required
- No
- Published
- Jun 2, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Pillow.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | pillow |
< 8.2.0 |
8.2.0 |
pip install "pillow>=8.2.0" |
| PyPI | pillow |
< 8.2.0 |
8.2.0 |
pip install "pillow>=8.2.0" |
Per OSV / GitHub Advisories (GHSA-q5hq-fp76-qmrc, PYSEC-2021-93). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| python | pillow | < 8.2.0 |
| fedoraproject | fedora | 33 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- lists.debian.org Third Party Advisory
- lists.fedoraproject.org
- pillow.readthedocs.io Third Party Advisory
- security.gentoo.org Third Party Advisory