---
id: CVE-2026-112892
title: 'Pillow: MSP RLE decoder expands a tiny file into unbounded memory'
summary: >-
  Pillow is a Python imaging library. From 4.1.0 until 13.0.0, Pillow's MSP RLE
  decoder can expand a small file into an unbounded in-memory buffer. The
  decoder writes run-length output to BytesIO without limiting expansion to the
  declared …
severity: high
cvss: 8.7
cvssVector: 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'
cvssSource: cna
cwe:
  - CWE-409
vendor: python-pillow
product: Pillow
affected:
  - 'Pillow >= 4.1.0, < 13.0.0'
published: '2026-10-19'
updated: '2026-10-19'
sourceUpdated: '2026-10-19T21:35:25.797Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-112892'
references:
  - url: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-gg2r-wvfm-q9rx
    label: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-gg2r-wvfm-q9rx
  - url: >-
      https://github.com/python-pillow/Pillow/commit/5dcb630b9798efd91929cb873d677aeee6ed0bb3
    label: >-
      https://github.com/python-pillow/Pillow/commit/5dcb630b9798efd91929cb873d677aeee6ed0bb3
  - 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-19T21:43:56.112Z'
---

## Overview

Pillow is a Python imaging library. From 4.1.0 until 13.0.0, Pillow's MSP RLE decoder can expand a small file into an unbounded in-memory buffer. The decoder writes run-length output to BytesIO without limiting expansion to the declared image size. An attacker can supply a crafted MSP image to an application that loads its pixels. This can exhaust memory and deny service even when the declared pixel count passes the decompression-bomb check. This issue is fixed in version 13.0.0.

## Affected

- `Pillow >= 4.1.0, < 13.0.0`

## Remediation

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