CVE-2026-112897

Pillow: TiffDecode returns uninitialized memory as pixels for short JPEG strips

Published Oct 19, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
Pillow is a Python imaging library. From 5.3.0 until 13.0.0, Pillow can return uninitialized memory as pixels when libtiff performs a short decode of JPEG-compressed or Group 4 fax TIFF data. The _decodeStrip and _decodeTile buffers can be larger than the bytes written by libtiff, but Pillow converts the expected rows without clearing the unwritten tail. The tile path is affected from 5.3.0 and the strip path from 6.0.0. An attacker can supply a crafted TIFF to an application that loads and returns or re-encodes its pixels. This can disclose stale heap contents without memory corruption or a process crash. This issue is fixed in version 13.0.0.

Analysis

AI-generated

Technical impact

Pillow can return uninitialized memory as pixels during TiffDecode of short JPEG-compressed or Group 4 fax strips, allowing a crafted TIFF file to expose stale heap contents. This flaw does not corrupt memory or crash the process; instead it leaks data that was previously stored on the heap, which can reveal sensitive information. The weakness is classified as CWE-908.

Affected Systems

The Pillow imaging library from version 5.3.0 through 13.0.0 is affected. The tile decoding path shipped from 5.3.0 and the strip decoding path from 6.0.0 are vulnerable. The issue was resolved in Pillow 13.0.0, so any release prior to that is potentially at risk.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, and the EPSS score is not available, so the exploitation likelihood cannot be precisely measured. The vulnerability is not listed in the CISA KEV catalog. An attacker can trigger the flaw by delivering a malicious TIFF to an application that loads or re-encodes the image, enabling disclosure of stale heap data. The attack requires no privileged access and can occur in any process that imports Pillow for image handling.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Pillow to version 13.0.0 or later to remove the vulnerability
  • If an upgrade is delayed, restrict the use of Pillow’s TiffDecode to trusted image sources or disable TIFF support for untrusted inputs
  • Re‑engineer the application to process TIFF images in a hardened or sandboxed environment to contain potential data leaks

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-q45j-58j2-45rg Pillow: TiffDecode returns uninitialized memory as pixels for short JPEG strips
History
Type Values Removed Values Added
First Time appeared Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
Vendors & Products Python
Python pillow
Metrics cvssV3_1

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

cvssV3_1

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

Type Values Removed Values Added
Metrics ssvc

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

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:H/I:N/A:N'}

threat_severity

Important

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 5.3.0 until 13.0.0, Pillow can return uninitialized memory as pixels when libtiff performs a short decode of JPEG-compressed or Group 4 fax TIFF data. The _decodeStrip and _decodeTile buffers can be larger than the bytes written by libtiff, but Pillow converts the expected rows without clearing the unwritten tail. The tile path is affected from 5.3.0 and the strip path from 6.0.0. An attacker can supply a crafted TIFF to an application that loads and returns or re-encodes its pixels. This can disclose stale heap contents without memory corruption or a process crash. This issue is fixed in version 13.0.0.
Title Pillow: TiffDecode returns uninitialized memory as pixels for short JPEG strips
Weaknesses CWE-908
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-908

    Use of Uninitialized Resource

Sources

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