high

CVE-2026-112892

PyPI · pillow

Summary

Pillow: MSP RLE decoder expands a tiny file into unbounded memory

Severity
high
EPSS
0.4% (p36)
CWE
CWE-409
Also known as
GHSA-gg2r-wvfm-q9rx
Published
2026-10-21
Updated
2026-10-21

Advisory 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:

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

Related advisories

Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.

Check my repo

Summarize with AI

ChatGPTClaudePerplexity

Sources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.