Heap buffer overflow in Pillow when saving TIFF images with libtiff
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-pillow | Pillow | 2.3.0 to before 13.0.0 | 13.0.0 | Patch available | CNA |
| — | Pillow (PyPI) | before 13.0.0 | 13.0.0 | Patch available | GHSA-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.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| 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
- 2026-11-12 Threatist record created from CVE-2026-128067
- 2026-11-13 Alias added: GHSA-xcvg-w56q-r89m
- 2026-11-13 Fix available: PyPI/[email protected] · GHSA-xcvg-w56q-r89m
- 2026-11-13 CVSS score added · GHSA-xcvg-w56q-r89m
- 2026-11-13 Weakness changed · GHSA-xcvg-w56q-r89m
- 2026-11-13 5 new references · GHSA-xcvg-w56q-r89m
- 2026-11-13 CISA SSVC decision points changed
References
Other 5
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-xcvg-w56q-r89m
- https://github.com/python-pillow/Pillow/commit/53318b50e8e9e85a57d033d4d879e1398d97aeb1
- https://github.com/python-pillow/Pillow/commit/ec5f1cbcf67275641abaad5c065ffb64a0a804a9
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/python-pillow/Pillow
More python-pillow vulnerabilities
- 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
Sources
- CVE-2026-128067 · CVE Program
- CVE-2026-128067 · NVD
- FIRST EPSS
- GHSA-xcvg-w56q-r89m · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences