CVE-2026-112892

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

Published Oct 19, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Pillow's MSP RLE decoder can decompress a small MSP image file into an unbounded amount of memory because the decoder writes run‑length output to a BytesIO stream without limiting expansion to the declared image size. This flaw means that a crafted MSP image can cause Pillow to allocate an arbitrary amount of memory when an application loads the image. The result is a denial of service through memory exhaustion, as the process or system can become unresponsive or crash. The vulnerability maps to CWE‑409 (Uncontrolled Size of Data Structure).

Affected Systems

All installations of the Python Pillow imaging library from version 4.1.0 up to but not including 13.0.0 are vulnerable. The issue was addressed in Pillow 13.0.0, which includes a fix that limits memory allocation based on the image dimensions. Users of earlier Pillow versions should review their application code to ensure it is not using these vulnerable releases.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. The EPSS score is not available, so the current probability of exploitation cannot be quantified, but the potential for denial of service exists whenever a Pillow‑based application processes untrusted MSP files. The vulnerability is not listed in CISA’s KEV catalog, suggesting no publicly confirmed exploit yet. An attacker would need to supply a malicious MSP image to an application that decodes it, such as through a web upload or a file‑processing service, which could lead to memory exhaustion and application or system downtime.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Pillow library to version 13.0.0 or later.
  • Validate the size of MSP images before decoding with Pillow and reject files exceeding a predefined safe limit.
  • Apply process‑level resource limits, such as ulimit or cgroup memory caps, to the services that load images to constrain the impact of a memory‑exhaustion attack.

Generated by OpenCVE AI on October 20, 2026 at 06:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-gg2r-wvfm-q9rx Pillow: MSP RLE decoder expands a tiny file into unbounded memory
History
Type Values Removed Values Added
First Time appeared Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
Vendors & Products Python
Python pillow
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow
Type Values Removed Values Added
Description 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.
Title Pillow: MSP RLE decoder expands a tiny file into unbounded memory
Weaknesses CWE-409
References
Metrics cvssV4_0

{'score': 8.7, 'vector': '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'}

Weaknesses
  • CWE-409

    Improper Handling of Highly Compressed Data (Data Amplification)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 22, 2026, 9:11 PM
Reserved
Oct 19, 2026, 8:16 PM
Status
Analyzed
Published
Oct 19, 2026, 10:17 PM
Modified
Oct 27, 2026, 2:59 PM
Severity
Important
Public date
Oct 19, 2026, 9:35 PM