NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

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

highCVSS 4.0 8.7GHSA-gg2r-wvfm-q9rx

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.

Published Oct 21, 2026

Affected packages

pillow

Ecosystem
PyPI
Affected
>= 4.1.0, < 13.0.0
Fixed in
13.0.0
Check
pip show pillow

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to MegaManSec, radarhere, hugovk.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries