Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size
CVE-2026-128067Published 12 Nov 2026, 22:49 UTC
Real-world risk
3.1/ 10Low
Routine
If the vulnerable configuration applies to you: 6.8
PreliminaryFrom the CVSS vector only · confidence low
CVSS
8.4
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| PillowUbiquitous | >= 2.3.0, < 13.0.0 | 13.0.0 |
What to do
Update to a fixed version: 13.0.0.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.5% chance of exploitation in 30 days (percentile 43), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.450
- Threat T1: Nothing known0.850
- 10 × impact 0.8 × prerequisites 0.45 × threat 0.853.060
- Rounded to one decimal between 0.1 and 103.1
Exploitation and evidence timeline
- 12 Nov 2026 Published
- 3 Dec 2026 Risk 3.1 (cvss fallback)
Weakness
CWE-787
References
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-xcvg-w56q-r89mvendor-advisory
- https://github.com/python-pillow/Pillow/commit/53318b50e8e9e85a57d033d4d879e1398d97aeb1misc
- https://github.com/python-pillow/Pillow/commit/ec5f1cbcf67275641abaad5c065ffb64a0a804a9misc
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0misc
- CVE-2026-128067 on CVE.org