What’s Vulnerable › Vulnerabilities
CVE-2026-96642: Pillow: TarIO negative size field causes infinite CPU-spin loop
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-10-21 · updated 2026-10-30
- Weakness: CWE-835
Description
Pillow is a Python imaging library. Prior to 13.0.0, the TarIO initializer in src/PIL/TarIO.py accepts a negative octal member size and computes a backward seek that returns to the same 512-byte header. When the requested member name does not match, the parser repeatedly reads that header, consumes a full CPU core, and never returns. TarIO is reached only when an application directly uses PIL.TarIO.TarIO rather than the default Image.open() path. This issue is fixed in version 13.0.0.
Affected products
- python-pillow Pillow: before 13.0.0 — fixed in 13.0.0
- Pypi Pillow: before 13.0.0; 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 (+101) — fixed in 13.0.0
- python-pillow Pillow: before 13.0.0
How to fix
Upgrade to a fixed version: python-pillow Pillow 13.0.0; Pypi Pillow 13.0.0. Check the vendor advisory for mitigations.
References
- https://github.com/python-pillow/Pillow/commit/19b695fdcc5eddc37374e2b1645fc4185edaf71d
- https://github.com/python-pillow/Pillow/pull/10012
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-3j72-p6qg-6xp7
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-3j72-p6qg-6xp7
Get alerted when CVE-2026-96642 or the next vulnerability affects your stack