CVE-2026-112391 Pillow: PdfParser can recurse without limit in get_value() and linearize_page_tree()
An attacker can cause a denial of service by providing a deeply nested PDF to applications using Pillow with PDF append enabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-112391?
CVE-2026-112391 is a medium-severity denial of service vulnerability in Python Pillow, published on 19 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-835
Which versions are affected by CVE-2026-112391?
3 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | From 5.1.0 | 13.0.0 |
pillow PyPI | From 5.1.0 | 13.0.0 |
Pillow PyPI | From 5.1.0 | 13.0.0 |
Products include Python Pillow.
How do I fix CVE-2026-112391?
Upgrade pillow to 13.0.0 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-112391 being exploited?
There is no known exploitation of CVE-2026-112391 in the wild and no public exploit code.
Other vulnerabilities in Python Pillow
Sources
Also known as BIT-pillow-2026-112391, DEBIAN-CVE-2026-112391, ECHO-5241-20a5-d9df, GHSA-254f-3936-288h, UBUNTU-CVE-2026-112391.