CVE-2021-28677
python-pillow: Excessive CPU use in EPS image reader
Overview
Description
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected packages · 2
Operating systems · 23 fixes
Red Hat 2 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | python-pillow +5 | eol | — |
| 8 | python3-pillow | 0:5.1.1-16.el8 | RHSA-2021:4149 |
alma 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | python3-pillow | 5.1.1-16.el8 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | py3-pillow | 8.2.0-r0 |
| 3.23 | py3-pillow | 8.2.0-r0 |
| 3.24 | py3-pillow | 8.2.0-r0 |
| edge | py3-pillow | 8.2.0-r0 |
amazon linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 2023 | python-pillow-debuginfo +6 | 9.4.0-2.amzn2023.0.1 |
debian 6 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | pillow | 5.4.1-2+deb10u3 |
| 11 | pillow | 8.1.2+dfsg-0.2 |
| 12 | pillow | 8.1.2+dfsg-0.2 |
| 13 | pillow | 8.1.2+dfsg-0.2 |
| 14 | pillow | 8.1.2+dfsg-0.2 |
| 9 | pillow | 4.0.0-4+deb9u3 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| pillow | 8.1.2+dfsg-0.2 |
rocky 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | python3-pillow | 5.1.1-16.el8 |
ubuntu 7 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04 | pillow | 5.1.0-1ubuntu0.6 |
| 18.04-ESM | pillow | 5.1.0-1ubuntu0.6 |
| 20.04 | pillow | 7.0.0-4ubuntu0.4 |
| 20.04-ESM | pillow | 7.0.0-4ubuntu0.4 |
| 22.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
| 24.04 | pillow | 8.1.2+dfsg-0.1ubuntu1 |
1 more row
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2021:4149
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-28677
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1915420
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1915432
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1934685
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1934699
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1934705
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1935384
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1935396
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1935401
Show all 48 references
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1958226
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1958231
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1958240
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1958252
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1958257
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1958263
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1982378
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35653
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35655
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25287
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25288
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25290
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25292
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25293
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27921
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27922
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27923
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28675
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28676
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28677
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28678
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34552
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2021:4149
- github.com https://github.com/advisories/GHSA-q5hq-fp76-qmrc
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-93.yaml
- github.com https://github.com/python-pillow/Pillow
- github.com https://github.com/python-pillow/Pillow/commit/5a5e6db0abf4e7a638fb1b3408c4e495a096cb92
- github.com https://github.com/python-pillow/Pillow/pull/5377
- lists.debian.org https://lists.debian.org/debian-lts-announce/2021/07/msg00018.html
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-28677
- pillow.readthedocs.io https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-28677-fix-eps-dos-on-open
- security.gentoo.org https://security.gentoo.org/glsa/202107-33
- ubuntu.com https://ubuntu.com/security/notices/USN-4963-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8135-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-28677
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.