CVE-2026-25990: Pillow Out-of-Bounds Write Vulnerability When Loading PSD Images

pillow Updated 11 Feb 2026

Summary

11/02/2026
Yes i
High
7.5

CVE-2026-25990: Pillow affected by out-of-bounds write when loading PSD images. Affects pillow versions >= 10.3.0, < 12.1.1. Fixed in 12.1.1. How to fix ↓

Also tracked for

The same CVE-2026-25990 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Pillow is a widely-used Python Imaging Library that adds image processing capabilities to your Python interpreter. It supports opening, manipulating, and saving various image file formats. With its extensive features, Pillow is a go-to library for developers needing to handle images in their applications. However, a recent vulnerability has been identified that affects versions 10.3.0 and above, specifically when loading PSD (Photoshop Document) images.

Vulnerability Detail

The vulnerability arises from an out-of-bounds write that can be triggered when loading specially crafted PSD images. This flaw can lead to potential data corruption or arbitrary code execution, posing significant security risks to applications that utilize Pillow for image processing. The issue is rooted in how the library handles certain image formats, making it crucial for developers to address this vulnerability promptly.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

12.1.1

This is the first release that contains the fix.

pip install --upgrade "pillow==12.1.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, you can prevent the loading of PSD images by using the 'formats' parameter in the Image.open() method. Here is an example of how to implement this:

from PIL import Image

Open an image while restricting formats

image = Image.open('your_image_file.jpg', formats=['JPEG', 'PNG'])

Conclusion

In summary, the vulnerability identified as CVE-2026-25990 poses a significant risk to applications using Pillow for image processing. It is essential to update to version 12.1.1 or later to mitigate this risk. Additionally, using the provided workaround can help prevent the issue until an update can be applied.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

The vulnerability is an out-of-bounds write that occurs when loading specially crafted PSD images, which can lead to data corruption or arbitrary code execution.

Pillow versions 10.3.0 and above are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

As a temporary workaround, you can restrict the formats that can be opened using the 'formats' parameter in the Image.open() method.

Related vulnerabilities

Recent vulnerabilities recorded for pillow.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

12.1.1

This is the first release that contains the fix.

pip install --upgrade "pillow==12.1.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback