CVE-2021-27923Python Pillow
High 7.5 No auth needed
Follow: this CVE · Python · Python Pillow We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 3.1% probability of exploitation in 30 days · percentile 88
- Auth required
- No
- Published
- Mar 3, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Pillow.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | pillow |
< 8.1.2 |
8.1.2 |
pip install "pillow>=8.1.2" |
| PyPI | pillow |
< 8.1.1 |
8.1.1 |
pip install "pillow>=8.1.1" |
Per OSV / GitHub Advisories (GHSA-95q3-8gr9-gm8w, PYSEC-2021-42). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| python | pillow | < 8.1.1 |
| fedoraproject | fedora | 32 |
| fedoraproject | fedora | 33 |
| fedoraproject | fedora | 34 |
Official sources
References
Links published by the sources. Open them with care.
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- pillow.readthedocs.io
- security.gentoo.org Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- pillow.readthedocs.io Release Notes Vendor Advisory