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

Published Oct 21, 2026
·
Updated

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.

Affected Software

1 affected component
pypi/Pillow<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 21, 2026
CVE Published
via MITRE·08:54 PM
Data Sourced
via MITRE·08:54 PM
DescriptionWeakness

Frequently Asked Questions

1

Which deployments are affected?

The issue affects Pillow versions before 13.0.0 when running on Windows. The vulnerable path is the Windows-only WMF/EMF renderer; non-Windows builds are not described as affected.

2

What does an attacker need to exploit this?

An attacker needs to cause the application to render a crafted WMF or EMF metafile. The malicious file uses wide, short dimensions that bypass the pixel-count decompression-bomb check while triggering the mismatched allocation and copy sizes.

3

What is the likely impact?

The renderer can read beyond a heap buffer, which may disclose process memory or crash the process. The provided information does not establish code execution.

4

What should be done if an immediate upgrade is not possible?

Avoid rendering untrusted WMF and EMF files on Windows until Pillow can be upgraded. Version 13.0.0 contains the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203