What’s Vulnerable › Vulnerabilities
GHSA-4fx9-vc88-q2xc: Infinite loop in Pillow
- Severity: low (CVSS 3.0)
- Exploited in the wild: not listed in CISA KEV
- Public exploit or detection template: none known
- Published: 2022-03-11 · updated 2024-12-05
- Weakness: CWE-400
Description
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. If the EOF marker is not detected as such however, this could lead to an infinite loop where JpegImagePlugin keeps trying to end the file.
Affected products
- Pypi Pillow: before 9.0.0; 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 (+78) — fixed in 9.0.0
How to fix
Upgrade to a fixed version: Pypi Pillow 9.0.0. Check the vendor advisory for mitigations.
References
- https://github.com/python-pillow/Pillow/commit/baae9ec4b67c68e3adaf1208cf54e8de5e38a6fd
- https://github.com/python-pillow/Pillow
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#ensure-jpegimageplugin-stops-at-the-end-of-a-truncated-file
Get alerted when GHSA-4fx9-vc88-q2xc or the next vulnerability affects your stack