Uncontrolled Resource Consumption in Pillow
Published 8 Jun 2021 · Updated 14 Oct 2024
Is your project on an affected pillow?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <8.2.0
- Fixed in
- 8.2.0
pip install 'pillow>=8.2.0'Details
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.
Is GHSA-q5hq-fp76-qmrc in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected pillow, and gives you the command that fixes it.
More advisories for pillow
- MediumCVE-2026-128066Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data · 12 Nov 2026
- HighCVE-2026-128067Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size · 12 Nov 2026
- CriticalCVE-2026-112398Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution · 23 Oct 2026
- MediumCVE-2026-114501Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1 · 23 Oct 2026
- HighGHSA-78g4-xqwv-q3g8Pillow: Bundled libopenjp2 2.5.4 in all wheels since 11.1.0 carries OSV-2025-219 heap-buffer-overflow write reachable from Image.open().load() · 22 Oct 2026
- HighCVE-2026-96778Pillow: Heap buffer overflow writing JPEG comment after ICC profile fills buffer · 22 Oct 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-28677
- Linkgithub.com/python-pillow/Pillow/pull/5377
- Linkgithub.com/python-pillow/Pillow/commit/5a5e6db0abf4e7a638fb1b3408c4e495a096cb92
- Advisorygithub.com/advisories/GHSA-q5hq-fp76-qmrc
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-93.yaml
- Packagegithub.com/python-pillow/Pillow
- Linklists.debian.org/debian-lts-announce/2021/07/msg00018.html
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MQHA5HAIBOYI3R6HDWCLAGFTIQP767FL
- Linkpillow.readthedocs.io/en/stable/releasenotes/8.2.0.html#cve-2021-28677-fix-eps-dos-on-open
- Linksecurity.gentoo.org/glsa/202107-33
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.