PyPI: pillow
CVE-2026-96636
Safety vulnerability ID: SFTY-20261022-03680
Affected versions of the Pillow package are vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) due to decompression-bomb protection being enforced only on the first frame of multi-frame images. The `MpoImageFile.seek()` and `DcxImageFile.seek()` methods re-parse subsequent frame headers and reassign `self._size` without invoking `Image._decompression_bomb_check`, unlike `GifImagePlugin` and `TiffImagePlugin`, which correctly re-check on every `seek()` call. An attacker can craft an MPO or DCX file whose first frame is small enough to pass the initial bomb check but whose later frame declares extremely large dimensions, so that when an application iterates frames via `seek()` and `load()` (e.g., thumbnailers or format converters), Pillow decodes the oversized frame and commits excessive memory, resulting in denial of service through memory exhaustion.
Overview
Pillow: Decompression-bomb protection bypass via multi-frame seek() in MPO and DCX (MpoImageFile.seek / DcxImageFile.seek)
Advisory
pillow – Improper Handling of Highly Compressed Data (Data Amplification)
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20261022-03680/CVE-2026-96636
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-p8hx-v2p6-rp84
- https://nvd.nist.gov/vuln/detail/CVE-2026-96636
- https://github.com/python-pillow/Pillow/pull/10011
- https://github.com/python-pillow/Pillow/commit/f1acfc54c53502948d0d14121872061df931db48
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/advisories/GHSA-p8hx-v2p6-rp84
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
