CVE-2021-28675Python Pillow
Medium 5.5
Follow: this CVE · Python · Python Pillow We alert you by email or Slack (account required).
- Priority
- 33
- CVSS 3.1
- 5.5
- EPSS
- 1.2% probability of exploitation in 30 days · percentile 68
- Auth required
- Yes
- Published
- Jun 2, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-252
- Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
What happens
An issue was discovered in Pillow before 8.2.0. PSDImagePlugin.PsdImageFile lacked a sanity check on the number of input layers relative to the size of the data block. This could lead to a DoS on Image.open prior to Image.load.
What to do
- Apply the vendor's security update for Pillow.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | pillow |
< 8.2.0 |
8.2.0 |
pip install "pillow>=8.2.0" |
| PyPI | pillow |
< 8.2.0 |
8.2.0 |
pip install "pillow>=8.2.0" |
Per OSV / GitHub Advisories (GHSA-g6rj-rv7j-xwp4, PYSEC-2021-139). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| python | pillow | < 8.2.0 |
| fedoraproject | fedora | 33 |
Official sources
References
Links published by the sources. Open them with care.
- lists.fedoraproject.org
- pillow.readthedocs.io Vendor Advisory
- security.gentoo.org Third Party Advisory