GHSA-4fx9-vc88-q2xc: Pillow Infinite Loop Vulnerability
LOWGHSA-4fx9-vc88-q2xc is a LOW infinite loop vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Pillow libraries in the PyPI ecosystem. The issue involves infinite loop in pillow. Remediation is available by upgrading affected packages to version 9.0.0.
GHSA-4fx9-vc88-q2xc at a Glance
How to Fix GHSA-4fx9-vc88-q2xc
To remediate this vulnerability, upgrade all affected Pillow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Pillow>=9.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Pillow
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-4fx9-vc88-q2xc, inspect your installed packages using pip:
pip show Pillow
Analyze the terminal output to locate any version of Pillow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.0.0), your application is affected.
Note: The pip show Pillow command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Pillow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-4fx9-vc88-q2xc Affected Pillow Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Pillow
|
PyPI |
< 9.0.0
|
9.0.0
|
References
Frequently Asked Questions
What is GHSA-4fx9-vc88-q2xc?
Which Pillow versions are affected?
What version fixes GHSA-4fx9-vc88-q2xc?
Is Pillow affected?
What CWE is associated with GHSA-4fx9-vc88-q2xc?
How can I check PyPI dependencies for GHSA-4fx9-vc88-q2xc?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4fx9-vc88-q2xc",
"modified" : "2022-03-11T23:39:27Z",
"published" : "2022-03-11T23:39:27Z",
"aliases" : [ ],
"summary" : "Infinite loop in Pillow",
"details" : "JpegImagePlugin may append an EOF marker to the end of a truncated file, so that the last segment of the data will still be processed by the decoder.\n\nIf the EOF marker is not detected as such however, this could lead to an infinite loop where JpegImagePlugin keeps trying to end the file.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Pillow"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/python-pillow/Pillow/commit/baae9ec4b67c68e3adaf1208cf54e8de5e38a6fd"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/python-pillow/Pillow"
}, {
"type" : "WEB",
"url" : "https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#ensure-jpegimageplugin-stops-at-the-end-of-a-truncated-file"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-11T23:39:27Z",
"nvd_published_at" : null
}
}