CVE-2026-112895

8.7High

Published Oct 19, 2026 · NVD status: Undergoing Analysis · AI triage by gemini-3.8-flash

8.7CVSS

High

0CVSS v4.010

Attack vector
Network
Complexity
Low
Privileges
None
User action
None
Impact
High impact on availability
Weakness
CWE-674

What an attacker gets

Remote attackers can crash services or exhaust CPU and memory via denial of service. They only need to submit a crafted PDF to an endpoint that appends images to PDFs using Image.save.

Root cause

PdfParser lacks cycle and duplication detection when traversing page-tree child references and trailer chains, causing uncontrolled recursion and super-linear resource consumption.

Affected versions

Pillow 5.1.0 through 12.x (before 13.0.0)

CVSS v4.0 · 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Fix & remediation

Upgrade Pillow to version 13.0.0 or higher. If patching immediately is not possible, disable PDF append operations or reject untrusted existing PDF files before appending.

remediation — bash
$ pip install --upgrade 'pillow>=13.0.0'

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD 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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-112895

More fully triaged vulnerabilities you may want to check next.