Skip to content
The Patch Observer
Thursday, October 22, 2026Your daily threat briefing323 reports
Vulnerabilities

Pillow TarIO flaw causes infinite loop and CPU exhaustion in Python apps

A high-severity flaw in Pillow versions before 13.0.0 allows crafted tar files to trigger an infinite loop. A patch is available for immediate deployment.

Illustration: A stylized blue pillow rests on a desk next to a tattered, unraveling fabric bundle.
AI-generated illustration: Patch Observer

Key points

  • CVE-2026-96642 affects Pillow versions earlier than 13.0.0.
  • The flaw causes 100 percent CPU usage via an infinite loop.
  • Version 13.0.0 contains the fix for this issue.

Pillow versions prior to 13.0.0 contain a high-severity vulnerability tracked as CVE-2026-96642. The issue resides in the TarIO component and allows an attacker to craft a tar archive that triggers an infinite loop. This loop consumes one hundred percent of CPU resources and prevents the process from exiting. Version 13.0.0 of the package includes the necessary fix to address this behavior.

How it unfolded

  • Researchers identified that TarIO.__init__ fails to validate tar header size fields for positive values.
  • A negative size value causes the file pointer to seek backward, canceling the read offset.
  • The loop restarts at the same header, creating a cycle that never reaches end-of-file conditions.

Who is affected

Any system using Pillow versions earlier than 13.0.0 is exposed to this flaw. The vulnerability is triggered when the application processes tar archives using the TarIO module. If the archive contains a header with a negative octal size field, the Python process hangs indefinitely. This results in complete CPU consumption for that process. No remote exploitation details are provided beyond the crafted file requirement.

Our take on the response

The patch in version 13.0.0 resolves the issue by ensuring proper validation of header sizes. The advisory provides clear steps to reproduce the hang, confirming the severity. Teams relying on image processing libraries should verify their dependency versions immediately. The fix is available in the latest release, allowing for straightforward remediation without complex workarounds.

Who needs to act first

Prioritize systems that ingest tar archives from external or untrusted sources. Check inventory for Pillow versions below 13.0.0. Test the update in a staging environment to ensure compatibility with existing image processing workflows. Back up configurations before applying the patch. Monitor CPU usage metrics for sudden spikes that could indicate exploitation attempts. Isolate affected services if immediate patching is not possible.

What to do and how to stay safe: Pillow

  • Verify current Pillow versions across all managed environments and compare against the fixed 13.0.0 release.
  • Apply the update to version 13.0.0 or later as soon as testing permits.
  • Monitor server CPU utilization for processes that handle tar file parsing.
  • Review logs for hung processes that do not terminate after file operations.

Step-by-step guide: Vulnerability Prioritization: How to Rank Risks Without Wasting Time

General security guidance from the Patch Observer newsroom. It is not confirmed advice from the organisations named in this story.

Frequently asked questions

What is the CVE ID for this Pillow vulnerability?

The CVE ID is CVE-2026-96642.

Which Pillow versions are vulnerable?

Versions earlier than 13.0.0 are affected by this high-severity flaw.

Is there a fix available?

Yes, version 13.0.0 includes the patch for this issue.

Sources

  1. GitHub Advisory Database
PillowCVE-2026-96642PythonTarIOGitHub Advisory

Related stories