CVE-2026-128067 Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

High 8.4 Published Updated

Attacker-controlled image geometry tags can make Pillow save compressed TIFFs with libtiff read heap memory or crash; apps saving untrusted images should care.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Harmful if only installed
No
Needs a specific call
Yes
Fix
Available

What is CVE-2026-128067?

CVE-2026-128067 is a high-severity memory corruption vulnerability in python-pillow Pillow, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-787

Which versions are affected by CVE-2026-128067?

1 open source package ship an affected version, including Pillow.

An affected version is only exploitable if your software calls TiffImagePlugin._save or ImagingLibTiffEncode. Many projects that include it are not exposed.

PackageAffectedFixed in
Pillow PyPI
pkg:pypi/pillow
All versions13.0.0
Status by vendor (1)
WhoReleaseStatusPackages
UpstreamfixedPillow (13.0.0)
pkg:pypi/pillow

How do I fix CVE-2026-128067?

Upgrade Pillow to 13.0.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-128067 being exploited?

There is no known exploitation of CVE-2026-128067 in the wild and no public exploit code.

Sources

Also known as GHSA-xcvg-w56q-r89m, UBUNTU-CVE-2026-128067.

Is CVE-2026-128067 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free