Pillow fixes a critical image-processing flaw that can lead to code execution
Pillow, Python's most widely used imaging library, has fixed CVE-2026-96639 (CVSS 9.8) in version 13.0.0. The flaw affects releases from 11.0.0 onwards and any application that opens untrusted PSD, MPO, DCX or MIC images.
What happened
A vulnerability tracked as CVE-2026-96639 has been disclosed in Pillow, rated CVSS 9.8 (critical). The bug lies in the loaders for multi-frame images. When a later frame switches to a wider colour mode (RGB or CMYK) while keeping the same dimensions, the library reuses the memory allocated for the previous frame without checking that it still fits.
A crafted PSD, MPO, DCX or MIC file can therefore trigger out-of-bounds memory writes that crash the application. With MPO files, an out-of-bounds read is also possible and, according to the description published in NVD, command execution has been demonstrated in certain specific runtime environments.
Who is affected
According to the vulnerability description, Pillow versions from 11.0.0 up to, but not including, 13.0.0 are affected. The risk is highest for applications that handle images supplied by users or third parties, such as upload portals, thumbnail generators, document management systems or image analysis services.
Pillow is often pulled in as an indirect dependency of other Python packages and frameworks, so it may be present on systems where nobody installed it deliberately, including container images.
Exploitation status
There is currently no record of active exploitation in CISA's KEV catalogue. However, since this is a critical flaw that can be triggered remotely, without authentication and without user interaction, the update should not be delayed.
What to do
The vulnerability is fixed in Pillow 13.0.0, released on 16 October according to the project's release notes on GitHub. The same notes state that this version drops support for Python 3.10 and removes previously deprecated features, so the upgrade should be tested before rollout. The project has not detailed any alternative mitigations for those unable to upgrade.
- Take stock of where Pillow is used: virtual environments, dependency files, containers and packages that bundle it indirectly.
- Upgrade to Pillow 13.0.0 and rebuild any container images that include it.
- Check compatibility: systems still running Python 3.10 will need to move to a newer Python release to install the fix.
- In the meantime, prioritise services that process untrusted images and, where the application allows it, reject PSD, MPO, DCX and MIC files if they are not needed.
- Review logs for unexpected crashes in image-processing processes.
Vulnerabilities (1)
| CVE | Severity | Active exploitation | Published | NVD status |
|---|---|---|---|---|
| CVE-2026-96639 | Critical (9.8) | — | 10/21/2026 | Analyzed |
Written automatically from NVD, CISA KEV and vendor advisory data. Always check affected versions and patches in the vendor's official advisory before acting.