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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| pillow (PyPI) | before 8.2.0 | GitHub Advisory Database, PyPA Advisory Database |
| python pillow | before 8.2.0 | NVD |
| fedoraproject fedora | 33 | NVD |
| pillow (Bitnami) | before 8.2.0 | Bitnami Vulnerability Database |
All scores
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| Bitnami Vulnerability Database | high 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
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-28677 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q5hq-fp76-qmrc changed 2024-10-14 | CC-BY-4.0 |
| NVD | CVE-2021-28677 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-93 changed 2023-12-06 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-PILLOW-2021-28677 changed 2026-09-08 | Apache-2.0 |