Infinite loop in Pillow - CVE-2026-96642

 

Infinite loop in Pillow - CVE-2026-96642

Published: November 3, 2026


Vulnerability identifier: #VU158909
CSH Severity: Medium
CVSS v4: 6.7 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-96642
CWE-ID: CWE-835
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service by hanging the affected process in an infinite loop that consumes full CPU.

The vulnerability exists due to missing validation of negative tar header sizes in Pillow's TarIO.__init__ when scanning an archive for a requested member. A remote attacker can supply a crafted tar archive with the size field set to b" -00001000" (negative 512) and a header name that does not match the requested member to cause repeated backward seeks to the same header, resulting in an infinite CPU-consuming loop.

Exploitation requires an application to call PIL.TarIO.TarIO(path, member_name) directly; Image.open() does not use this helper.


Affected software

Pillow

How to mitigate CVE-2026-96642

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins