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

Published Oct 21, 2026
·
Updated

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 Software

1 affected component
pypi/Pillow<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 21, 2026
CVE Published
via MITRE·08:49 PM
Data Sourced
via MITRE·08:49 PM
DescriptionWeakness

Frequently Asked Questions

1

Which applications are exposed to this denial-of-service issue?

Only applications that directly instantiate PIL.TarIO.TarIO are affected. The default Image.open() path does not reach the vulnerable TarIO code.

2

What must an attacker provide to trigger the CPU-spin loop?

The attacker needs a TAR input with a negative octal member-size field and must cause TarIO to look for a member name that does not match the repeated header. Under those conditions, the parser repeatedly rereads the same 512-byte header and does not return.

3

Which Pillow versions need remediation?

Pillow versions before 13.0.0 are affected. Upgrade to version 13.0.0 to obtain the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203