# CVE-2026-112895: Pillow: Unbounded recursion parsing a PDF page tree or trailer chain (incomplete fix for CVE-2026-42310)

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-19T21:57:14.207Z
- Modified: 2026-10-29T10:45:11.254Z
- Also known as: GHSA-p4wg-p73j-c528, BIT-PILLOW-2026-112895
- Weaknesses: CWE-674
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- python-pillow Pillow: >= 5.1.0, < 13.0.0
- pillow (PyPI): from 5.1.0 before 13.0.0
- python pillow: from 5.1.0 before 13.0.0
- pillow (Bitnami): from 5.1.0 before 13.0.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/python-pillow/Pillow/security/advisories/GHSA-p4wg-p73j-c528> (exploit, advisory, vendor-advisory, web)
- <https://github.com/python-pillow/Pillow/commit/e2ae7eacad6de68c37eb28b633a97bebacf2c5bf> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/releases/tag/13.0.0> (article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-112895> (advisory, web)
- <https://github.com/python-pillow/Pillow> (package)

## Sources

- CVE List: [CVE-2026-112895](https://www.cve.org/CVERecord?id=CVE-2026-112895), CVE Terms of Use, modified 2026-10-20
- GitHub Advisory Database: [GHSA-p4wg-p73j-c528](https://github.com/advisories/GHSA-p4wg-p73j-c528), CC-BY-4.0, modified 2026-10-26
- NVD: [CVE-2026-112895](https://nvd.nist.gov/vuln/detail/CVE-2026-112895), Public domain, modified 2026-10-27
- Bitnami Vulnerability Database: [BIT-PILLOW-2026-112895](https://osv.dev/vulnerability/BIT-PILLOW-2026-112895), Apache-2.0, modified 2026-10-29

---

Page: https://cve.day/CVE-2026-112895 · Whole record: https://cve.day/CVE-2026-112895.json · Rebuilt by cve.day 2026-11-25T22:59:45.958Z
