Impact
A mismatch between the declared output mode of an ImageCmsTransform and the mode of the supplied output image can produce a controlled out‑of‑bounds write into native heap memory when Pillow executes ImageCmsTransform.apply(). This vulnerability is classified as CWE‑787 and can corrupt memory, potentially causing application crashes or, if exploited, arbitrary code execution.
Affected Systems
All releases of the Pillow library (python‑pillow) prior to version 12.3.0 are affected when the ImageCmsTransform.apply() method is invoked with an output image whose mode does not match the transform’s declared output mode; any Python application that imports Pillow and processes images with this API is potentially impacted.
Risk and Exploitability
The CVSS score of 7.5 indicates moderate to high severity, while the EPSS score of less than 1% and its absence from the CISA KEV catalog suggest a very low likelihood of widespread exploitation. The likely attack vector is local or via the application’s image handling component, as it requires an attacker to supply a crafted image to the library; if successful, the memory corruption could be leveraged for arbitrary code execution, though no public exploits have been reported.
OpenCVE Enrichment
Github GHSA