Exploited now
Vulnerability WatchVulnerabilities, exploits & advisories — updated every 15 minutes
Alerts

Home › CVE › Python

CVE-2026-96640 — python-pillow Pillow

High · CVSS 8.2EPSS 0.6% First seen October 21, 2026
PythonVulnerabilities

Summary

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, PdfParser.linearize_page_tree() in src/PIL/PdfParser.py treats a PDF /Pages graph as a tree without tracking duplicate indirect references. When Image.save(..., format="PDF", append=True) processes an attacker-controlled existing PDF whose /Kids arrays repeatedly reference the same child /Pages node, Pillow expands the shared subtree as distinct pages. A compact malformed PDF can therefore create exponentially many page references and consume disproportionate CPU before the append completes. This issue is fixed in version 13.0.0.

Description: NIST National Vulnerability Database (public domain)

Severity breakdown

High · 8.2 CVSS 4.0 base score from the CNA (github.com)

An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.

Attack from
the network (remotely)
Attack complexity
low (no special conditions)
Special conditions
only in some setups or conditions
Login needed
no
User action needed
no
Impact
high on availability, none on confidentiality and integrity
Impact on other systems
none

Vector CVSS:4.0/AV:N/AC:L/AT:P/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 · CVSS 3.1 7.5 from NVD: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-407: Inefficient Algorithmic Complexity

Affected and fixed versions

ProductAffected versionsFixed in
python-pillow Pillow>= 5.1.0, < 13.0.0—

From the vendor's CVE record; confirm with the vendor advisory before relying on a version number.

References by type

Vendor advisories

Patches and fixed releases

Details from NVD (public domain).

Affected

  • python-pillow Pillow

What to do

  • Check whether you run an affected product or version and apply the vendor's update or mitigation.
  • Follow the vendor advisory and the references below for fixed versions and workarounds.

Frequently asked questions

What is CVE-2026-96640?

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, PdfParser.linearizepagetree() in src/PIL/PdfParser.py treats a PDF /Pages graph as a tree without tracking duplicate indirect references. When Image.save(..., format="PDF", append=True) processes an attacker-controlled existing PDF whose /Kids arrays repeatedly reference the same child /Pages node, Pillow expands the shared subtree as distinct pages. Weakness type: Uncontrolled Resource Consumption (CWE-400).

How severe is CVE-2026-96640?

CVE-2026-96640 has a CVSS 4.0 base score of 8.2 (high), from the CNA (github.com). An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.

Is CVE-2026-96640 being exploited?

Not as far as is known: CVE-2026-96640 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 0.6% chance that it is exploited in the next 30 days.

Which versions are affected by CVE-2026-96640?

python-pillow Pillow >= 5.1.0, < 13.0.0.

How do I fix CVE-2026-96640?

Apply the update or mitigation in the vendor's advisory, linked on this page under Vendor advisories.

Timeline & sources

References

Related vulnerabilities & news