Read the docs

Heap buffer overflow in Pillow when saving TIFF images with libtiff

Priority LOW 37CWE-787Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
—
Confidentiality · integrity · availability
High · Low · High
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.

Summary

Pillow from 2.3.0 before 13.0.0 has a heap buffer overflow (CWE-787) when applications save compressed TIFF images through libtiff. Attacker-controlled image geometry tags can make libtiff consume a larger scanline than the buffer allocated for it. An attacker who controls these tags can read heap memory into the generated TIFF or crash the process, and with TIFF Predictor 2 enabled can corrupt memory beyond the buffer.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

Description from the CNA

Pillow is a Python imaging library. From 2.3.0 through 12.3.0, Pillow applications that save compressed TIFF images through libtiff can pass attacker-controlled image geometry tags to the encoder while allocating its row buffer from the actual image dimensions. The affected TiffImagePlugin._save path allows ImageWidth, ImageLength, or SamplesPerPixel from exif=, tiffinfo=, or a source TIFF IFD to make libtiff consume a larger scanline than the buffer supplied by ImagingLibTiffEncode. This can read heap memory into the generated TIFF or crash the process. When TIFF Predictor 2 is enabled, libtiff can rewrite the oversized scanline in place and corrupt memory beyond the buffer. A carried-over PlanarConfiguration value of 2 instead makes libtiff use a shorter scanline and can produce an undecodable output file, but is not established to cause the out-of-bounds access. This issue is fixed in version 13.0.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00451 39th percentileScored 2026-11-16
Fix Fixed Pillow (python-pillow): 13.0.0Pillow (PyPI): 13.0.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
python-pillowPillow2.3.0 to before 13.0.013.0.0Patch availableCNA
—Pillow (PyPI)before 13.0.013.0.0Patch availableGHSA-xcvg-w56q-r89m
  • Pillow Vendorpython-pillow Affected 2.3.0 to before 13.0.0 Fixed in 13.0.0 Patch available CNA
  • Pillow (PyPI) Vendor— Affected before 13.0.0 Fixed in 13.0.0 Patch available GHSA-xcvg-w56q-r89m

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*——python-pillow
  • cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* Versions — — ·python-pillow

Remediation

Upgrade Pillow to version 13.0.0, the fixed version listed for both the python-pillow vendor entry and the PyPI package.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

  • Fix · CNA Pillow (python-pillow) Fixed in 13.0.0
  • Fix · GHSA-xcvg-w56q-r89m Pillow (PyPI) Fixed in 13.0.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from CVE-2026-128067
  2. 2026-11-13 Alias added: GHSA-xcvg-w56q-r89m
  3. 2026-11-13 Fix available: PyPI/[email protected] · GHSA-xcvg-w56q-r89m
  4. 2026-11-13 CVSS score added · GHSA-xcvg-w56q-r89m
  5. 2026-11-13 Weakness changed · GHSA-xcvg-w56q-r89m
  6. 2026-11-13 5 new references · GHSA-xcvg-w56q-r89m
  7. 2026-11-13 CISA SSVC decision points changed

References

  • TI-2016-01993 The DES and Triple DES ciphers, as used in the TLS, SSH, and IPSec protocols and other… CVSS 3.1HIGH 7.5
  • TI-2022-24108 An XML External Entity (XXE) issue was discovered in Python through 3.9.1. CVSS 3.1CRITICAL 9.8
  • TI-2022-17508 The Keccak XKCP SHA-3 reference implementation before fdc6fef has an integer overflow and… CVSS 3.1CRITICAL 9.8
  • TI-2021-02254 Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c… CVSS 3.1CRITICAL 9.8
  • TI-2007-04413 Directory traversal vulnerability in the (1) extract and (2) extractall functions in the… CVSS 3.1CRITICAL 9.8
  • TI-2026-76627 Out-of-bounds read in Pillow TIFF encoder ColorMap handling CVSS 4.0HIGH 8.8
See all 320 →

Sources