Pillow versions prior to 13.0.0 contain a vulnerability in the libtiff TIFF encoder where crafted TIFF tags can cause invalid memory reads or process crashes. This occurs when attacker-controlled image metadata is saved, potentially leading to disclosure of process memory if the encoded output is returned to an attacker. The issue affects operations that re-save compressed TIFF images or convert images preserving EXIF metadata into compressed TIFF output. The vulnerability is fixed in Pillow 13.0.0.