CVE-2026-96644

Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds)

Published Oct 21, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
Description
Pillow is a Python imaging library. Prior to 13.0.0 on Windows, src/PIL/WmfImagePlugin.py passes unchecked 32-bit WMF or EMF dimensions to the native drawwmf handler in src/display.c. The handler sizes a DIB allocation from 16-bit-truncated bcWidth and bcHeight fields but copies pixel data using the original full dimensions. A crafted wide, short metafile can pass the pixel-count decompression-bomb check and make the Windows-only renderer read beyond the heap buffer, potentially disclosing memory or crashing the process. This issue is fixed in version 13.0.0.

Analysis

AI-generated

Technical impact

Pillow, the Python imaging library, contains a heap over‑read vulnerability in its Windows‑only WMF/EMF renderer. The rendering code accepts 32-bit image dimensions but truncates them to 16 bits when allocating the destination raster, while copying pixel data using the full 32‑bit values. A crafted “wide, short” metafile that passes the decompression‑bomb check can trigger a buffer over‑read, potentially leaking sensitive memory contents or causing a process crash. The flaw is a classic unchecked “read over allocation” error (CWE‑125).

Affected Systems

The flaw exists in the Pillow library (python‑pillow:Pillow) for Windows builds on all versions before 13.0.0. Version 13.0.0 and later contain the fix and are not affected.

Risk and Exploitability

The CVSS score for this issue is 7.1, indicating a high‑severity risk. The EPSS score is not available, so the measured likelihood of exploitation is uncertain, and the vulnerability is not currently listed in the CISA KEV catalog. The likely attack vector is remote or local exploitation via a crafted WMF or EMF file that an application processes with Pillow on Windows; the attacker can supply or inject such a file to read memory or crash the target process.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or newer, which contains the authoritative fix for the truncated dimension bug.
  • If the application does not require WMF/EMF processing, disable or remove support for those file types to eliminate the attack surface.
  • Validate image dimensions and content before passing them to Pillow, ensuring that only trusted or size‑restricted images are processed, and consider sandboxing image rendering to contain any future faults.

Generated by OpenCVE AI on October 22, 2026 at 06:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-9v9v-9qvf-h2hj Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds)
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Microsoft
Microsoft windows
Python
Python pillow
CPEs cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
cpe:2.3:o:microsoft:windows:-:*:*:*:*:*:*:*
Vendors & Products Microsoft
Microsoft windows
Python
Python pillow
Metrics cvssV3_1

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

cvssV3_1

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

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

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. Prior to 13.0.0 on Windows, src/PIL/WmfImagePlugin.py passes unchecked 32-bit WMF or EMF dimensions to the native drawwmf handler in src/display.c. The handler sizes a DIB allocation from 16-bit-truncated bcWidth and bcHeight fields but copies pixel data using the original full dimensions. A crafted wide, short metafile can pass the pixel-count decompression-bomb check and make the Windows-only renderer read beyond the heap buffer, potentially disclosing memory or crashing the process. This issue is fixed in version 13.0.0.
Title Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows builds)
Weaknesses CWE-125
References
Metrics cvssV4_0

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

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 28, 2026, 6:22 PM
Reserved
Sep 23, 2026, 2:35 PM
Status
Modified
Published
Oct 21, 2026, 9:20 PM
Modified
Oct 28, 2026, 7:19 PM
Severity
Important
Public date
Oct 21, 2026, 8:54 PM