CVE-2022-45199
Description
Pillow before 9.3.0 allows denial of service via SAMPLESPERPIXEL.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Pillow before 9.3.0 allows denial of service via a crafted TIFF image with an oversized SAMPLESPERPIXEL tag.
Vulnerability
Overview
Pillow versions prior to 9.3.0 are vulnerable to a denial-of-service condition via the SAMPLESPERPIXEL tag in TIFF images. A crafted TIFF file with an excessively large value for SAMPLESPERPIXEL can cause excessive memory allocation and runtime during image decoding [1][4]. The issue was introduced in Pillow 9.2.0 and was fixed by limiting SAMPLESPERPIXEL to the number of planes the decoder can handle [1][4].
Exploitation
An attacker can exploit this vulnerability by supplying a specially crafted TIFF image to an application that uses Pillow to process images. No authentication is required; the image only needs to be opened or decoded by Pillow. The attack vector is remote if the application processes user-supplied images [1][4].
Impact
Successful exploitation leads to a denial of service, potentially consuming excessive memory or CPU time, which may cause the application to hang or crash [1][4].
Mitigation
Users should upgrade to Pillow 9.3.0 or later, which includes the fix that caps SAMPLESPERPIXEL to prevent the runtime denial of service [1][4].
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.3.0 | 9.3.0 |
Affected products
3- Pillow/Pillowdescription
- osv-coords2 versions
< 9.3.0+ 1 more
- (no CPE)range: < 9.3.0
- (no CPE)range: >= 9.2.0, < 9.3.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
8- github.com/advisories/GHSA-q4mp-jvh2-76fjghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-45199ghsaADVISORY
- security.gentoo.org/glsa/202211-10ghsavendor-advisoryWEB
- bugs.gentoo.org/878769ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-42980.yamlghsaWEB
- github.com/python-pillow/Pillow/commit/2444cddab2f83f28687c7c20871574acbb6dbcf3ghsaWEB
- github.com/python-pillow/Pillow/pull/6700ghsaWEB
- github.com/python-pillow/Pillow/releases/tag/9.3.0ghsaWEB
News mentions
0No linked articles in our index yet.