CVE-2021-28677 json
Uncontrolled Resource Consumption in Pillow
published 2021-06-02 5 y ago modified 2026-09-08 2 mo ago also BIT-pillow-2021-28677 , EUVD-2021-0184 , GHSA-q5hq-fp76-qmrc , PYSEC-2021-93
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.5%
- EPSS 2.5% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pillow 8.2.0
- bitnami pillow 8.2.0
- python pillow 8.2.0
- pillow Debian 14, Debian 13, Debian 12 8.1.2+dfsg-0.2
debian advisories DEBIAN-CVE-2021-28677
- pillow Ubuntu 18.04 LTS 5.1.0-1ubuntu0.6
- pillow Ubuntu 20.04 LTS 7.0.0-4ubuntu0.4
- pillow Ubuntu Pro 14.04 LTS 2.3.0-1ubuntu3.4+esm5
- pillow Ubuntu Pro 16.04 LTS 3.1.2-0ubuntu1.6+esm3
ubuntu advisories UBUNTU-CVE-2021-28677
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-pillow RHEL 8 5.1.1-16.el8
- python3-pillow RHEL 8 5.1.1-16.el8
red hat advisories RHSA-2021:4149
- python-Pillow openSUSE Leap 15.5 7.2.0-150300.3.12.1
- python-Pillow OpenStack Cloud 7 2.8.1-4.22.1
- python-Pillow OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 4.2.1-3.14.1
- python-Pillow OpenStack Cloud Crowbar 9, OpenStack Cloud 9 5.2.0-3.8.1
suse advisories SUSE-SU-2024:1607-1SUSE-SU-2021:1940-1SUSE-SU-2021:1939-1SUSE-SU-2021:1938-1
- python3-pillow AlmaLinux 8 5.1.1-16.el8
almalinux advisories ALSA-2021:4149
- python-pillow Rocky Linux 8 5.1.1-16.el8
rocky linux advisories RLSA-2021:4149
- py3-pillow Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 8.2.0-r0
alpine advisories ALPINE-CVE-2021-28677
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/python-pillow/Pillow@5a5e6db commit
- github.com/python-pillow/Pillow#5377 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-28677 updated cvss 7.5
python-pillow: Excessive CPU use in EPS image reader
-
Red Hat Enterprise Linux 7 python-pillow, python-pillow-qt, python-pillow-tk, python-pillow-saneaffected: workaround, no fix planned “To mitigate this feature on Red Hat Quay keep the invoice generation feature disabled, as it is by default.”
-
Red Hat Quay 3 quay/quay-rhel8affected: workaround, no fix available “To mitigate this feature on Red Hat Quay keep the invoice generation feature disabled, as it is by default.”
-
Red Hat Enterprise Linux AppStream (v. 8) python-pillow 5.1.1-16.el8, python3-pillow 5.1.1-16.el8fixed: vendor fix “To mitigate this feature on Red Hat Quay keep the invoice generation feature disabled, as it is by default.” RHSA-2021:4149
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.47% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pillow | <8.2.0 |
8.2.0 |
| bitnami | pillow | <8.2.0 |
8.2.0 |
Classification
- Weakness
-
- CWE-400 Uncontrolled Resource Consumption
References
-
github.com
/python-pillow/Pillow/pull/5377
web, patch, third-party-advisory, advisory
-
github.com
/python-pillow/Pillow/commit/5a5e6db0abf4e7a638fb1b3408c4e495a096cb92
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/
vendor-advisory, web
-
security.gentoo.org
/glsa/202107-33
vendor-advisory, web, third-party-advisory, advisory
-
pillow.readthedocs.io
/en/stable/releasenotes/8.2.0.html#cve-2021-28677-fix-eps-dos-on-open
web, third-party-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2021/07/msg00018.html
mailing-list, web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-28677
advisory, web
-
github.com
/advisories/GHSA-q5hq-fp76-qmrc
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-93.yaml
web
-
github.com
/python-pillow/Pillow
package
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/
web
Sources
- CVE List CVE-2021-28677
- GitHub Advisory GHSA-q5hq-fp76-qmrc
- NVD CVE-2021-28677
- OSV BIT-pillow-2021-28677
- OSV PYSEC-2021-93
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.