Security fix · CVE-2026-112895
Pillow is a Python imaging library.
Published Oct 19, 2026 · catalog updated Oct 20, 2026 · Pillow is a Python
Last checked Oct 31, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-112895. EPSS is 0.59%. Act only if a listed version of Pillow is a Python is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- High8.7
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.59%
- Remediation
- Version ranges on file
- Affected products
- pip pillow
### Summary When an application appends to an existing PDF with , Pillow parses that file with . Two recursive parsers have no effective bound. follows with no visited set or depth limit, so a cyclic or duplicated page tree recurses without end. rejects only an exactly repeated offset, so a long chain of unique offsets still recurses. The trailer-loop guard added for CVE-2026-42310 does not cover either case. ### Details recurses on with no cycle or depth check: - catches only a repeated offset: - (the check at is the CVE-2026-42310 fix; a unique-offset chain slips past it) ### PoC Run it: The 315-byte file triggers the recursion on parse. A duplicated (non-cyclic) tree instead produces super-linear CPU and memory work, and a long unique-offset chain triggers the trailer-side recursion. ### Impact A service that appends to user-supplied PDFs, for example a stamping or watermarking pipeline, can be driven into uncaught recursion or heavy CPU and memory use before any image is written. Follow-up to CVE-2026-42310. Since Pillow's policy discourages filing plain Python exceptions as denial of service, lead with the cyclic-tree case, which burns CPU and memory rather than only raising . The fix is a visited set plus a depth limit in both parsers.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- pip pillow>= 5.1.0, < 13.0.0
How to fix CVE-2026-112895
Upgrade
CVE-2026-112895 lists a fix boundary at 13.0.0. Compare the installed build with that boundary before you change production.
Version check
Affected < 13.0.0
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-112895. EPSS is 0.59%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with >= 5.1.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-674. EPSS 0.59%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 19, 2026 · NIST NVD
Detected
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 Pyth
Oct 20, 2026 · NIST NVD
Updated
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 Pyth
Oct 20, 2026 · NIST NVD
Updated
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 Pyth
Oct 20, 2026 · GitHub Advisory Database
Updated
### Summary When an application appends to an existing PDF with , Pillow parses that file with . Two recursive parsers have no effective bound. follows with no visited set or depth limit, so a cyclic or duplicated page tree recurses without end. rejects only an exactly repeated offset, so a long chain of unique offsets still recurses. The trailer-loop guard added for CVE-2026-42310 does not cover
Sources
- CVE.orgVulnerability recordCVE-2026-112895
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-112895
30-day exploitation probability 0.59%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-p4wg-p73j-c528
Pillow: Unbounded recursion parsing a PDF page tree or trailer chain (incomplete fix for CVE-2026-42310)
github.com - NIST NVDVulnerability recordCVE-2026-112895
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
nvd.nist.gov
References
Freshness
Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSOct 31, 2026
- GitHub Advisory DatabaseOct 21, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 21, 2026