CVE-2021-28675: Pillow denial of service
5.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.26269%
CWE
Published
6/8/2021
Updated
10/9/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
Pillow | pip | < 8.2.0 | 8.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the _layerinfo function in PsdImagePlugin.py, which processes PSD layer information. The commit diff shows the vulnerability was fixed by adding a check comparing 'ct_bytes' (data block size) against 'abs(ct) * 20' (required bytes for claimed layers). Prior to 8.2.0, this validation was missing, allowing attackers to specify an unrealistic number of layers that would exhaust resources during parsing. The CVE description and patch both directly reference this function as the source of the missing sanity check.