Impact
A heap use‑after‑free occurs in Pillow between the 11.3.0 and 13.0.0 releases when libtiff rejects a tag during encoding TIFF data to an in‑memory buffer. The error path frees the output buffer, then cleanup writes through the callback into freed memory, which can crash the process and may lead to code execution. The weakness is classified as CWE‑416.
Affected Systems
The vulnerability affects the Pillow imaging library released by python‑pillow. Any installation of Pillow from version 11.3.0 up to and including 13.0.0 that uses the in‑memory buffer encoding path is susceptible. These versions are in active use in many Python applications that process TIFF images.
Risk and Exploitability
The CVSS score of 5.9 indicates moderate severity. No EPSS data is available, and the vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that an attacker must supply a TIFF document that contains malicious or malformed tags to the library while it writes to a BytesIO buffer. The attack is likely local to the process; if the application runs with elevated privileges, the resulting code execution could be far more damaging. Detection of exploitation would typically be a crash or abnormal termination of the Python process.
OpenCVE Enrichment