HighGHSA-95q3-8gr9-gm8wBIT-pillow-2021-27923CVE-2021-27923PYSEC-2021-42
Pillow Denial of Service by Uncontrolled Resource Consumption
Published 18 Mar 2021 · Updated 15 Aug 2025
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
pillowPyPI
- Affected
- <8.1.2
- Fixed in
- 8.1.2
Update to the fixed version for your release line, for example:
pip install 'pillow>=8.1.2'Details
Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICO container, and thus an attempted memory allocation can be very large.
Is GHSA-95q3-8gr9-gm8w 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-27923
- Linkgithub.com/python-pillow/Pillow/commit/756fff33128a0b643d10518a26ad04b726dd8973
- Advisorygithub.com/advisories/GHSA-95q3-8gr9-gm8w
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2021-42.yaml
- Packagegithub.com/python-pillow/Pillow
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S7G44Z33J4BNI2DPDROHWGVG2U7ZH5JU
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S7G44Z33J4BNI2DPDROHWGVG2U7ZH5JU
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TQQY6472RX4J2SUJENWDZAWKTJJGP2ML
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZTSY25UJU7NJUFHH3HWT575LT4TDFWBZ
- Linkpillow.readthedocs.io/en/stable/releasenotes/8.1.1.html
- Linkpillow.readthedocs.io/en/stable/releasenotes/8.1.2.html
- Linksecurity.gentoo.org/glsa/202107-33
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.