Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can exhaust resources while parsing an existing PDF during an append operation. PdfParser follows page-tree child references without cycle or duplication tracking and follows previous-trailer chains with only an exact repeated-offset guard, so deep or cyclic page trees and long chains of unique trailer offsets can exhaust the Python stack. Repeated non-cyclic /Kids references can also cause super-linear CPU and memory use. An attacker can supply such a PDF to an application that calls Image.save with PDF append enabled. This can raise an uncaught RecursionError or consume excessive CPU and memory before output is written, causing denial of service. This issue is fixed in version 13.0.0.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/python-pillow/Pillow/commit/e2ae7eacad6de68c37eb28b633a97bebacf2c5bf Patch
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-p4wg-p73j-c528 Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 8
- Cpes+1 CPE criteria (now 1)NVD modified 2026-10-27 14:56
- StatusPublished → AnalyzedNVD modified 2026-10-27 14:56
- StatusUndergoing Analysis → PublishedNVD modified 2026-10-20 16:08
- StatusPublished → Undergoing AnalysisNVD modified 2026-10-20 19:50
- StatusReceived → PublishedNVD modified 2026-10-20 16:08
- StatusPublished → ReceivedNVD modified 2026-10-20 17:17
- StatusReceived → PublishedNVD modified 2026-10-19 21:57
- First seenCVSS 8.7NVD modified 2026-10-19 22:17
Affected (CPE criteria) 1
cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*