CVE-2026-112391 · GHSA-254f-3936-288h
Pillow: PdfParser can recurse without limit in get_value() and linearize_page_tree()
- Risk score
- 71/100
- CVSS
- 7.5 v3.1
- Exploit chance (30 days)
- 0.4%
- Published
- 19 Oct 2026
Open in the live forecast Today's forecast
What to know
- What it is
- Pillow's PdfParser can recurse without limit in get_value() and linearize_page_tree(), allowing an attacker to cause denial of service by providing a deeply nested PDF.
- Affected
- {'products': ['Pillow'], 'packages': [{'ecosystem': 'pip', 'name': 'Pillow', 'vulnerable': '>= 5.1.0, < 13.0.0'}], 'versions': ['5.1.0', '13.0.0']}
- Fix
- Upgrade to version 13.0.0 or later
- Exploitation
- Public proof of concept
Story map
At a glance
Pillow: Amber, patch this week. Pillow's PdfParser can recurse without limit in get_value() and linearize_page_tree(), allowing an attacker to cause denial of service by providing a deeply nested PDF.
The flaws
- CVE-2026-112391: PdfParser can recurse without limit in get_value() and linearize_page_tree() (CVSS 7.5 · EPSS 0%)
- CVE-2026-112390: Infinite loop in MIC n_frames when the embedded TIFF (CVSS 7.5 · EPSS 0%)
The fix
Upgrade Pillow: 13.0.0 or later on your release line
Who is exposed: {'products': ['Pillow'], 'packages': [{'ecosystem': 'pip', 'name': 'Pillow', 'vulnerable': '>= 5.1.0, < 13.0.0'}], 'versions': ['5.1.0', '13.0.0']}
Where it stands
- Public proof of concept
Connects to
- Same weakness: CWE-835 (CWE-835). 52 other warnings in 30 days
Why it is Amber
- CVSS 7.5 high
- Public exploit or proof of concept referenced
- Remotely exploitable without logging in
- On your watchlist: python, PyPI
Affected packages
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
| Pillow | pip | >= 5.1.0, < 13.0.0 | 13.0.0 |
References
- https://github.com/advisories/GHSA-254f-3936-288h
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-254f-3936-288h
- https://nvd.nist.gov/vuln/detail/CVE-2026-112391
- https://github.com/python-pillow/Pillow/commit/94cb11c44ff7345414da17ebfea1598a529ad9cd
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/advisories/GHSA-254f-3936-288h
Original description
Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow's PdfParser.get_value() can recurse without a limit while reading nested PDF objects. The parser follows attacker-controlled arrays and dictionaries when an existing PDF is opened for append. An attacker can provide a deeply nested PDF to an application that saves an image with PDF append enabled. This can raise an uncaught RecursionError or terminate the worker, causing denial of service. This issue is fixed in version 13.0.0.
Last activity 19 Oct 2026. Patch Forecast updates every hour.