CVE-2021-28677
JSON

7.5high

Uncontrolled Resource Consumption in Pillow

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
2.47% (higher than 85% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-q5hq-fp76-qmrcBIT-PILLOW-2021-28677PYSEC-2021-93

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
pillow (PyPI)before 8.2.0GitHub Advisory Database, PyPA Advisory Database
python pillowbefore 8.2.0NVD
fedoraproject fedora33NVD
pillow (Bitnami)before 8.2.0Bitnami Vulnerability Database

All scores

GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P
Bitnami Vulnerability Databasehigh rating

Classification

What each source says

CVE List

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.

NVD (es)

Se ha detectado un problema en Pillow versiones anteriores a 8.2.0,. Para los datos EPS, la implementación readline usada en la función EPSImageFile tiene que tratar con cualquier combinación de \r y \n como finales de línea. Usaba un método accidentalmente cuadrático de acumulación de líneas mientras buscaba un final de línea. Un archivo EPS malicioso podría usar esto para llevar a cabo un DoS de Pillow en la fase de apertura, antes de que una imagen fuera aceptada para su apertura

References

https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-28677-fix-eps-dos-on-openadvisory, third-party-advisory, web
https://github.com/python-pillow/Pillow/pull/5377advisory, patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/vendor-advisory, web
https://security.gentoo.org/glsa/202107-33advisory, third-party-advisory, vendor-advisory, web
https://lists.debian.org/debian-lts-announce/2021/07/msg00018.htmladvisory, mailing-list, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-28677advisory, web
https://github.com/python-pillow/Pillow/commit/5a5e6db0abf4e7a638fb1b3408c4e495a096cb92web
https://github.com/advisories/GHSA-q5hq-fp76-qmrcadvisory
https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-93.yamlweb
https://github.com/python-pillow/Pillowpackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FLweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL/web

Sources

SourceRecordLicence
CVE ListCVE-2021-28677 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-q5hq-fp76-qmrc changed 2024-10-14CC-BY-4.0
NVDCVE-2021-28677 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-93 changed 2023-12-06CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-PILLOW-2021-28677 changed 2026-09-08Apache-2.0