---
schema_version: '1.0'
id: security-20261022-ff76d6
title: 'CVE-2026-112892: Pillow: MSP RLE decoder expands a tiny file into unbounded
  memory'
url: https://osv.dev/vulnerability/GHSA-gg2r-wvfm-q9rx
url_hash: ff76d62ec0cdf9e6e564d4ff1eb3caa0ca00d6528d8e836dfd5f8699a4195293
canonical_url: https://osv.dev/vulnerability/GHSA-gg2r-wvfm-q9rx
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-112892
- GHSA-gg2r-wvfm-q9rx
- severity: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
- pillow
- PyPI
lang: en
published_at: '2026-10-21T21:12:56Z'
fetched_at: '2026-10-22T11:50:12.876497Z'
updated_at: '2026-10-22T17:08:16Z'
status: published
content_hash: be85dc412eedf6aa91453bc5eb4c5c921db5c65039de3e67a66f347e2d340a3b
content_changed_at: null
license_note: full
summary: 'Pillow: MSP RLE decoder expands a tiny file into unbounded memory'
summary_source: rss
summary_en: 'Pillow: MSP RLE decoder expands a tiny file into unbounded memory'
summary_omitted_reason: null
redistribution: true
keywords_en:
- Armin Arlert
- cve
- CVE-2026-112892
- decoder
- expands
- file
- GHSA-gg2r-wvfm-q9rx
- into
- library vulnerability
- memory
- MSP
- pillow
- PyPI
- RLE
- severity: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
- Shay McVeigh
- software security
- tiny
- unbounded
entities_en:
- name: Armin Arlert
  type: person
- name: Shay McVeigh
  type: person
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: Shay McVeigh
  type: person
- name: Armin Arlert
  type: person
key_facts: []
related: []
related_auto:
- name: Bristol Crown Court
  type: organization
  weight: 1.0
- name: Bristol Magistrates Court
  type: organization
  weight: 1.0
- name: Annie
  type: person
  weight: 1.0
computed_at: '2026-10-22T17:08:13Z'
---

# CVE-2026-112892: Pillow: MSP RLE decoder expands a tiny file into unbounded memory

## TL;DR
Pillow: MSP RLE decoder expands a tiny file into unbounded memory

## Key Points
- cve / CVE-2026-112892 / GHSA-gg2r-wvfm-q9rx / severity: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 / pillow / PyPI

## Details
**Severity:** 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
**Advisory:** GHSA-gg2r-wvfm-q9rx (CVE-2026-112892)

**Details:**
### Summary
The MSP RLE decoder expands run-length data into an in-memory buffer with no cap tied to the declared image size. A small file that passes the pixel-count check can force hundreds of megabytes or more of allocation when the application loads pixels.

### Details
The MSP decoder writes each run into an unbounded `io.BytesIO` and can expand roughly 85x per run:

- `src/PIL/MspImagePlugin.py:144-146`

### Impact
Memory-exhaustion denial of service from a tiny crafted image in any application that loads pixels. The expansion is decoupled from the declared pixel count, so `MAX_IMAGE_PIXELS` does not bound it.

**References:**
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-gg2r-wvfm-q9rx
- https://nvd.nist.gov/vuln/detail/CVE-2026-112892
- https://github.com/python-pillow/Pillow/commit/5dcb630b9798efd91929cb873d677aeee6ed0bb3
- https://github.com/python-pillow/Pillow
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-gg2r-wvfm-q9rx_

## Source
元記事: [CVE-2026-112892: Pillow: MSP RLE decoder expands a tiny file into unbounded memory](https://osv.dev/vulnerability/GHSA-gg2r-wvfm-q9rx) — published 2026-10-21T21:12:56Z
