CVE-2026-112901: Pillow Image Processing Library Suffers from ReDoS Vulnerability in XbmImagePlugin

pillow Updated 21 Oct 2026

Summary

21/10/2026
Yes i
Moderate
6.9

CVE-2026-112901: Pillow: ReDoS in XbmImagePlugin: 512-byte file stalls Image.open() for minutes. Affects pillow versions < 13.0.0. Fixed in 13.0.0. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pillow is a widely used open-source Python Imaging Library (PIL) that provides extensive capabilities for opening, manipulating, and saving various image file formats. It is designed to be user-friendly and supports numerous image processing tasks, making it a popular choice among developers. However, a recently discovered vulnerability in the XbmImagePlugin component can lead to significant performance issues when handling specially crafted image files.

Vulnerability Detail

The vulnerability, identified as CVE-2026-112901, arises from a catastrophic backtracking issue in the regular expression used by the XbmImagePlugin to identify XBM files. A crafted 512-byte file can cause the Image.open() function to consume excessive CPU time, stalling for several minutes before ultimately failing with an UnidentifiedImageError. This vulnerability can be exploited by anyone who can upload or send image data to an application using Pillow, potentially leading to a denial of service by exhausting CPU resources.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

The newest release already contains this fix.

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

Workaround

As a temporary workaround, you can pass an allowlist of formats to the Image.open() function that excludes 'XBM'. This will prevent the vulnerable code from being executed. For example: 'Image.open(file, formats=['JPEG', 'PNG'])'.

Conclusion

The CVE-2026-112901 vulnerability in the Pillow library's XbmImagePlugin poses a significant risk due to its potential for denial of service through crafted image files. It is crucial for developers using Pillow to update to the latest version to mitigate this risk and ensure the stability of their applications.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

CVE-2026-112901 is a vulnerability in the Pillow library's XbmImagePlugin that allows for denial of service through regular expression backtracking.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors open-source vulnerabilities in real-time.

Exploitation of this vulnerability can lead to significant CPU resource exhaustion, causing applications to become unresponsive or slow.

Yes, the vulnerability has been patched in Pillow version 13.0.0 and later. Updating to this version will resolve the issue.

The CVSS score for this vulnerability is 6.9, indicating a moderate severity level.

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"

The newest release already contains this fix.

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