Impact
Pillow, the Python imaging library, has a flaw that allows a malicious image to overwrite memory allocated for a different image mode. The bug arises when a multi‑frame loader creates a narrow storage buffer for one frame and later reuses it for a frame that uses a wider mode such as RGB or CMYK without verifying the buffer size. This can trigger a native out‑of‑bounds write or, in certain profiles, a native over‑read, which may lead to a crash or even execution of arbitrary code. The vulnerability is mapped to CWE‑125 and CWE‑787 and is scored CVSS 9.8.
Affected Systems
The flaw affects the Pillow library for versions 11.0.0 through 12.x.x that support multi‑frame image formats such as PSD, MPO, DCX, and MIC. It is fixed in Pillow 13.0.0 and later. Users of older Pillow versions that process external images are at risk.
Risk and Exploitability
The CVSS score of 9.8 indicates severe impact. As the EPSS score is not available, no quantified likelihood of exploitation is present, but the existence of a confirmed arbitrary‑code‑execution path suggests that the risk is significant. The attack vector and exploitation details are inferred from the CVE description and would involve delivering a crafted image – locally or over a network – to any code that uses Pillow to load or manipulate it. Since many web frameworks and image‑processing pipelines rely on Pillow, the vulnerability can affect a wide range of applications.
OpenCVE Enrichment
Github GHSA