Tetrak
GitHub ↗
Security · Pillow

A tiled TIFF makes the decoder read past its tile buffer

The tiled-TIFF decoder reads past the tile buffer in copy4 when libtiff returns a tile smaller than the worst case.

Advisory
CVE-2026-112395 (also GHSA-462x-pgg6-55fp)
Library
Pillow, pillow on PyPI
Published
Severity
6.5 out of 10, as published
Affected
>= 8.2.0, < 13.0.0
Fixed in
13.0.0
Reaches you
by opening a file

What triggers it

Opening and loading a malformed tiled TIFF.

What sillybos does

Refused with a setting

sillybos refuses the triggering file when the policy says so (STRICT, or Policy(allow_tiled_tiff=False)); the default policy lets it through.

Whether a TIFF is tiled is in its directory. The default policy allows tiles (digitisation and mapping software write them) and holds each tile to max_pixels; the strict preset refuses tiled TIFFs outright.

Proved by these tests in the sillybos suite, each of which builds the triggering file from bytes and checks that it is refused:

How to protect yourself

In general. Upgrade to Pillow 13.0.0.

Specifically. If your scans are striped, not tiled, refuse tiled TIFFs: sillybos --no-tiled-tiff, or the strict preset.

The general advice applies to every row here.

Sources