# GHSA-GG2R-WVFM-Q9RX: Pillow: MSP RLE decoder expands a tiny file into unbounded memory

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Also known as: BIT-PILLOW-2026-112892
- Published: 2026-10-21
- Modified: 2026-10-26

## Tracked as

- [CVE-2026-112892](https://cve.now/CVE-2026-112892.md): Pillow: MSP RLE decoder expands a tiny file into unbounded memory

## Affected versions

- pillow (PyPI): from 4.1.0, fixed in 13.0.0

## Description

### 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

Page: https://cve.now/GHSA-GG2R-WVFM-Q9RX

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
