# GHSA-4fx9-vc88-q2xc: Infinite loop in Pillow

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-03-11T23:39:27.000Z
- Modified: 2024-12-05T05:35:12.297Z
- Weaknesses: 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.

(As written by GitHub Advisory Database.)

## Affected

- pillow (PyPI): before 9.0.0

## References

- <https://github.com/python-pillow/Pillow/commit/baae9ec4b67c68e3adaf1208cf54e8de5e38a6fd> (web)
- <https://github.com/python-pillow/Pillow> (package)
- <https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#ensure-jpegimageplugin-stops-at-the-end-of-a-truncated-file> (web)

## Sources

- GitHub Advisory Database: [GHSA-4fx9-vc88-q2xc](https://github.com/advisories/GHSA-4fx9-vc88-q2xc), CC-BY-4.0, modified 2024-12-05

---

Page: https://cve.day/GHSA-4fx9-vc88-q2xc · Whole record: https://cve.day/GHSA-4fx9-vc88-q2xc.json · Rebuilt by cve.day 2026-11-25T22:56:33.893Z
