CVE-2026-96642 Pillow: TarIO negative size field causes infinite CPU-spin loop

High 7.1 Published Updated
Exploited in the wild
Not known
Fix
Available

What is CVE-2026-96642?

CVE-2026-96642 is a high-severity vulnerability in Python Pillow, published on 21 Oct 2026.

Official 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.

Weakness: CWE-835

Which versions are affected by CVE-2026-96642?

4 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.

PackageAffectedFixed in
pillow BitnamiAll versions13.0.0
pillow PyPIAll versions13.0.0
pillow PyPIAll versions13.0.0
Pillow PyPIAll versions13.0.0

Products include Python Pillow.

How do I fix CVE-2026-96642?

Upgrade pillow to 13.0.0 or later.

Is CVE-2026-96642 being exploited?

There is no known exploitation of CVE-2026-96642 in the wild and no public exploit code.

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-96642, DEBIAN-CVE-2026-96642, ECHO-274d-5de4-fefd, GHSA-3j72-p6qg-6xp7, PYSEC-2026-4341, ROOT-APP-PYPI-CVE-2026-96642 and 1 more.

Is CVE-2026-96642 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free