MEDIUM6.5
PYSEC-2026-4341
Quick fix
PYSEC-2026-4341 — pillow: upgrade to the fixed version with the command below.
pip install --upgrade 'pillow>=13.0.0'Details
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.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0[ADVISORY]
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-3j72-p6qg-6xp7[ADVISORY]
- https://github.com/python-pillow/Pillow/pull/10012[REPORT]
- https://github.com/python-pillow/Pillow/commit/19b695fdcc5eddc37374e2b1645fc4185edaf71d[FIX]