CVE-2022-45198
Description
Pillow before 9.2.0 performs Improper Handling of Highly Compressed GIF Data (Data Amplification).
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Pillow before 9.2.0 fails to handle highly compressed GIF data, leading to a decompression bomb vulnerability that can cause denial of service.
Vulnerability
Description
CVE-2022-45198 is a data amplification vulnerability in Pillow, the Python Imaging Library, affecting versions prior to 9.2.0. The issue stems from improper handling of highly compressed GIF data, a classic decompression bomb scenario (CWE-409) [1]. When a specially crafted GIF file with an extremely high compression ratio is processed, the library expands the compressed data into a disproportionately large output, consuming excessive memory and CPU resources.
Exploitation
An attacker can exploit this vulnerability by providing a small, maliciously crafted GIF image to an application that uses Pillow to decode it. No authentication or special network position is required; the attack can be delivered via any vector that allows the attacker to supply an image file (e.g., file upload, email attachment, or web content). The GIF's compression ratio is chosen so that the decompressed data far exceeds the input size, triggering uncontrolled memory allocation [2].
Impact
Successful exploitation leads to a denial of service (DoS) condition. The application may become unresponsive, crash, or exhaust available system memory, potentially affecting other processes on the same host. This vulnerability does not allow code execution or data exfiltration, but it can disrupt service availability [3].
Mitigation
The issue is fixed in Pillow version 9.2.0, which introduces a decompression bomb check for GIF images [2][4]. Users should upgrade to Pillow 9.2.0 or later. No workarounds are documented; however, limiting the size of uploaded images or using a proxy to validate image dimensions may reduce risk. The vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities catalog.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
pillowPyPI | < 9.2.0 | 9.2.0 |
Affected products
6- Pillow/Pillowdescription
- osv-coords5 versionspkg:bitnami/pillowpkg:pypi/pillowpkg:rpm/opensuse/python-Pillow&distro=openSUSE%20Leap%2015.5pkg:rpm/suse/python-Pillow&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP6pkg:rpm/suse/python-Pillow&distro=SUSE%20Package%20Hub%2015%20SP5
< 9.2.0+ 4 more
- (no CPE)range: < 9.2.0
- (no CPE)range: < 9.2.0
- (no CPE)range: < 7.2.0-150300.3.18.1
- (no CPE)range: < 7.2.0-150300.3.18.1
- (no CPE)range: < 8.4.0-bp155.3.9.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
10- github.com/advisories/GHSA-m2vv-5vj5-2hm7ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-45198ghsaADVISORY
- security.gentoo.org/glsa/202211-10ghsavendor-advisoryWEB
- bugs.gentoo.org/855683ghsaWEB
- cwe.mitre.org/data/definitions/409.htmlghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-42979.yamlghsaWEB
- github.com/python-pillow/Pillow/commit/11918eac0628ec8ac0812670d9838361ead2d6a4ghsaWEB
- github.com/python-pillow/Pillow/pull/6402ghsaWEB
- github.com/python-pillow/Pillow/pull/6402/commits/c9f1b35e981075110a23487a8d4a6cbb59a588eaghsaWEB
- github.com/python-pillow/Pillow/releases/tag/9.2.0ghsaWEB
News mentions
0No linked articles in our index yet.