Infinite loop in Pillow PdfParser.rewrite_pages on cyclic page tree
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 9 fixed, 9 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-835.
Summary
Pillow from 5.1.0 before 13.0.0 can enter an infinite loop while rewriting PDF pages. PdfParser.rewrite_pages() follows Parent relationships without detecting a cycle in the page tree (CWE-835). An unauthenticated remote attacker who supplies a cyclic PDF to an application that appends an image to it can hold the worker at full CPU and deny service. The references include an exploit link.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can enter an infinite loop while rewriting PDF pages. PdfParser.rewrite_pages() follows Parent relationships without detecting a cycle in the page tree. An attacker can supply a cyclic PDF to an application that appends an image to that PDF. This can hold the worker at full CPU and deny service. This issue is fixed in version 13.0.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-pillow | Pillow | 5.1.0 to before 13.0.0 | 13.0.0 | Patch available | CNA |
| — | Pillow (PyPI) | 5.1.0 to before 13.0.0 | 13.0.0 | Patch available | GHSA-f2g6-542v-9j58 |
- Pillow Vendorpython-pillow Affected 5.1.0 to before 13.0.0 Fixed in 13.0.0 Patch available CNA
- Pillow (PyPI) Vendor— Affected 5.1.0 to before 13.0.0 Fixed in 13.0.0 Patch available GHSA-f2g6-542v-9j58
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* | 5.1.0 to before 13.0.0 | Vulnerable | python-pillow |
- cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* Versions 5.1.0 to before 13.0.0 Vulnerable ·python-pillow
Remediation
Upgrade Pillow to version 13.0.0, which fixes the flaw in the PyPI and python-pillow packages. Red Hat fixes python-pillow for RHEL 8 AppStream and CRB in RHSA-2026:92639. Fixes for Satellite 6.16 to 6.19 and Red Hat AI Inference Server 3.5 are listed in RHSA-2026:95655, RHSA-2026:95656, RHSA-2026:95657, RHSA-2026:92861, RHSA-2026:94631, RHSA-2026:94702, RHSA-2026:94709, RHSA-2026:94715, RHSA-2026:94717, RHSA-2026:94721 and RHSA-2026:94738. Red Hat lists the fix plan as none available for Red Hat Ansible Automation Platform 2, Red Hat Quay 3 and Red Hat OpenShift AI (RHOAI).
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA Pillow (python-pillow) Fixed in 13.0.0
- Fix · GHSA-f2g6-542v-9j58 Pillow (PyPI) Fixed in 13.0.0 Advisory →
Red Hat 12 advisories
- RHSA-2026:95655 Released 2026-11-05 · Red Hat rating CriticalSatellite 6.16 EUS security update
- Red Hat Satellite 6.16 for RHEL 8 openvox-agent-8.32.0-1.el8sat, openvox-server-8.18.0-1.el8sat, python-brotli-1.2.1-1.el8pc +11
- Red Hat Satellite 6.16 for RHEL 9 openvox-agent-8.32.0-1.el9sat, openvox-server-8.18.0-1.el9sat, python-brotli-1.2.1-1.el9pc +11
- RHSA-2026:95657 Released 2026-11-05 · Red Hat rating CriticalSatellite 6.18 security update
- Red Hat Satellite 6.18 for RHEL 9 openvox-agent-8.32.0-1.el9sat, openvox-server-8.18.0-1.el9sat, python3.12-brotli-1.2.1-1.el9pc +4
- RHSA-2026:95656 Released 2026-11-05 · Red Hat rating CriticalSatellite 6.17 security update
- Red Hat Satellite 6.17 for RHEL 9 openvox-agent-8.32.0-1.el9sat, openvox-server-8.18.0-1.el9sat, python-brotli-1.2.1-1.el9pc +9
Show 9 more Red Hat advisories
- RHSA-2026:94738 Released 2026-11-03 · Red Hat rating CriticalRed Hat AI Inference 3.5.3 (CUDA)
- Red Hat AI Inference Server 3.5 registry.redhat.io/rhaii/vllm-cuda-rhel9
- RHSA-2026:94721 Released 2026-11-03 · Red Hat rating CriticalRed Hat AI Inference Tech Preview 3.5.3 (Gaudi)
- Red Hat AI Inference Server 3.5 registry.redhat.io/rhaii/vllm-gaudi-rhel9
- RHSA-2026:94717 Released 2026-11-03 · Red Hat rating CriticalRed Hat AI Inference 3.5.3 (Spyre)
- Red Hat AI Inference Server 3.5 registry.redhat.io/rhaii/vllm-spyre-rhel9
- RHSA-2026:94715 Released 2026-11-03 · Red Hat rating CriticalRed Hat AI Inference Model Optimization Tools 3.5.3 (CUDA)
- Red Hat AI Inference Server 3.5 registry.redhat.io/rhaii/model-opt-cuda-rhel9
- RHSA-2026:94709 Released 2026-11-03 · Red Hat rating CriticalRed Hat AI Inference 3.5.3 (ROCm)
- Red Hat AI Inference Server 3.5 registry.redhat.io/rhaii/vllm-rocm-rhel9
- RHSA-2026:94702 Released 2026-11-03 · Red Hat rating CriticalRed Hat AI Inference 3.5.3 (CPU)
- Red Hat AI Inference Server 3.5 registry.redhat.io/rhaii/vllm-cpu-rhel9
- RHSA-2026:94631 Released 2026-11-03 · Red Hat rating CriticalGuideLLM 3.5.1
- Red Hat OpenShift AI 3.5 registry.redhat.io/rhai/guidellm-rhel9
- RHSA-2026:92639 Released 2026-10-29 · Red Hat rating Importantpython-pillow security update
- Red Hat Enterprise Linux AppStream (v. 8) python-pillow-5.1.1-33.el8_10, python3-pillow-5.1.1-33.el8_10
- Red Hat Enterprise Linux CRB (v. 8) python3-pillow-5.1.1-33.el8_10, python3-pillow-devel-5.1.1-33.el8_10, python3-pillow-doc-5.1.1-33.el8_10 +1
- RHSA-2026:92861 Released 2026-10-29 · Red Hat rating CriticalSatellite 6.19 security update
- Red Hat Satellite 6.19 for RHEL 9 openvox-agent-8.31.1-1.el9sat, openvox-server-8.17.0-1.el9sat, python3.12-brotli-1.2.1-1.el9pc +6
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Exploit Intelligence | Affected | No fix yet |
| Lightspeed Core | Affected | No fix yet |
| OpenShift Lightspeed | Affected | No fix yet |
| Red Hat AI Inference Server | Affected | No fix planned: Will not fix |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | Affected | No fix yet |
| Red Hat Lightspeed Services for OCP | Affected | No fix yet |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet |
| Red Hat Quay 3 | Affected | No fix yet |
| Red Hat AI Inference Server 3.5 | Fixed | RHSA-2026:94702, RHSA-2026:94709, RHSA-2026:94715, RHSA-2026:94717, RHSA-2026:94721, RHSA-2026:94738 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2026:92639 |
| Red Hat Enterprise Linux CRB (v. 8) | Fixed | RHSA-2026:92639 |
| Red Hat OpenShift AI 3.5 | Fixed | RHSA-2026:94631 |
| Red Hat Satellite 6.16 for RHEL 8 | Fixed | RHSA-2026:95655 |
| Red Hat Satellite 6.16 for RHEL 9 | Fixed | RHSA-2026:95655 |
| Red Hat Satellite 6.17 for RHEL 9 | Fixed | RHSA-2026:95656 |
| Red Hat Satellite 6.18 for RHEL 9 | Fixed | RHSA-2026:95657 |
| Red Hat Satellite 6.19 for RHEL 9 | Fixed | RHSA-2026:92861 |
Not affected: 7 products
- Red Hat Ansible Automation Platform 2
- Red Hat OpenShift AI (RHOAI)
- Red Hat Satellite 6.16 for RHEL 8
- Red Hat Satellite 6.16 for RHEL 9
- Red Hat Satellite 6.17 for RHEL 9
- Red Hat Satellite 6.18 for RHEL 9
- Red Hat Satellite 6.19 for RHEL 9
Timeline
- 2026-10-20 Threatist record created from CVE-2026-112406
- 2026-10-20 CISA SSVC decision points changed
- 2026-10-21 Affected versions changed · Red Hat
- 2026-10-21 CVSS score added · Red Hat
- 2026-10-21 Alias added: GHSA-f2g6-542v-9j58
- 2026-10-21 Fix available: PyPI/[email protected] · GHSA-f2g6-542v-9j58
- 2026-10-21 CVSS score added · GHSA-f2g6-542v-9j58
- 2026-10-21 Weakness changed · GHSA-f2g6-542v-9j58
- 2026-10-21 5 new references · GHSA-f2g6-542v-9j58
- 2026-10-27 CVSS score added · NVD
- 2026-10-30 Fix available: RHSA-2026:92639 · Red Hat
- 2026-10-30 Fix available: Red Hat Enterprise Linux AppStream (v. 8), Red Hat Enterprise Linux CRB (v. 8) · Red Hat
- 2026-10-30 Fix available: Red Hat Satellite 6.19 for RHEL 9 · Red Hat
- 2026-10-31 Fix available: RHSA-2026:92861 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94717 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94715 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94709 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94738 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94702 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94631 · Red Hat
- 2026-11-04 Fix available: RHSA-2026:94721 · Red Hat
- 2026-11-04 Fix available: Red Hat AI Inference Server 3.5, Red Hat OpenShift AI 3.5 · Red Hat
- 2026-11-06 Fix available: Red Hat Satellite 6.16 for RHEL 8, Red Hat Satellite 6.16 for RHEL 9, Red Hat Satellite 6.17 for RHEL 9 +1 · Red Hat
- 2026-11-06 Fix available: RHSA-2026:95656 · Red Hat
- 2026-11-06 Fix available: RHSA-2026:95655 · Red Hat
- 2026-11-06 Fix available: RHSA-2026:95657 · Red Hat
References
More python-pillow Pillow vulnerabilities
- TI-2026-76627 Out-of-bounds read in Pillow TIFF encoder ColorMap handling CVSS 4.0HIGH 8.8
- TI-2026-76625 Quadratic-time denial of service in Pillow PDF save_all CVSS 4.0HIGH 8.7
- TI-2026-76605 NULL pointer dereference in Pillow's Image.merge function CVSS 4.0HIGH 8.7
- TI-2026-76604 Out-of-bounds read in Pillow TIFF decoding leaks heap memory CVSS 4.0HIGH 8.8
- TI-2026-76602 Double free in Pillow ImagingScaleAffine on allocation failure CVSS 4.0HIGH 8.7
- TI-2026-76600 GIF seek in Pillow keeps rejected size, allowing denial of service CVSS 4.0HIGH 8.7
Sources
- CVE-2026-112406 · CVE Program
- CVE-2026-112406 · NVD
- FIRST EPSS
- GHSA-f2g6-542v-9j58 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-112406 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences