cve.bz

CVE-2026-128067

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

8.4 highFix available

High (8.4) in python-pillow pillow. Fixed in pillow 13.0.0.

On this page
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.

Severity

CVSS 4.0

8.4 high
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
CWE
CWE-787 Out-of-bounds Write
Published
Assigned by
GitHub_M (CNA)
NVD analysis
Not in the NVD yet
Record from
the CVE List, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-128067 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-128067?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-128067?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-128067 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-128067

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-128067](https://cve.bz/cve/badge/CVE-2026-128067.svg)](https://cve.bz/cve/CVE-2026-128067)

HTML:

<a href="https://cve.bz/cve/CVE-2026-128067"><img src="https://cve.bz/cve/badge/CVE-2026-128067.svg" alt="CVE-2026-128067"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
python-pillow Pillow>= 2.3.0, < 13.0.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-xcvg-w56q-r89mPyPIpillow<13.0.013.0.0

References

Check your stackJSON