---
id: CVE-2026-112901
title: 'Pillow: ReDoS in XbmImagePlugin: 512-byte file stalls Image.open() for minutes'
summary: >-
  Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header
  parser is vulnerable to regular-expression denial of service. In
  XbmImageFile._open, when an application calls Image.open() on a small crafted
  XBM file, XbmImagePlu…
severity: medium
cvss: 6.9
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-1333
vendor: python-pillow
product: Pillow
affected:
  - Pillow < 13.0.0
published: '2026-10-19'
updated: '2026-10-19'
sourceUpdated: '2026-10-19T22:09:52.614Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-112901'
references:
  - url: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-xgh8-jp6q-p5x8
    label: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-xgh8-jp6q-p5x8
  - url: >-
      https://github.com/python-pillow/Pillow/commit/2852a3e3d568997ddec745fc800991f138878f4b
    label: >-
      https://github.com/python-pillow/Pillow/commit/2852a3e3d568997ddec745fc800991f138878f4b
  - url: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
    label: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
tags:
  - cve.org
ingestedAt: '2026-10-19T22:46:42.319Z'
---

## Overview

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's XBM header parser is vulnerable to regular-expression denial of service. In XbmImageFile._open, when an application calls Image.open() on a small crafted XBM file, XbmImagePlugin applies a backtracking expression to the attacker-controlled header before image dimensions are accepted, stalling a worker for minutes and denying service. This issue is fixed in version 13.0.0.

## Affected

- `Pillow < 13.0.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
