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.
Affected products
python: pillow; microsoft: windows
References5
- github.com/python-pillow/Pillow/security/advisories/GHSA-9v9v-9… Vendor Advisory
- github.com/python-pillow/Pillow/security/advisories/GHSA-9v9v-9… Vendor Advisory
- github.com/python-pillow/Pillow/commit/4cf46bee338304c5c8968fd7… Patch
- github.com/python-pillow/Pillow/pull/10120 Issue Tracking
- github.com/python-pillow/Pillow/releases/tag/13.0.0 Release Notes
Metrics
- CVSS 3.1
-
8.1
HIGH
Score source: NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - CVSS 4.0
-
7.1
HIGH
Score source: CNA
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - EPSS — exploit probability
- 0% percentile: 33 · as of 8 November 2026
- CWE
- CWE-125
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.