CVE-2026-112392
8.2HighPublished 19 Oct 2026 · NVD status: Received · AI triage by gemini-3.8-flash
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
- Impact
- High impact on availability
- Weakness
- CWE-476
Impact
Remote unauthenticated attackers can crash the application process by submitting a zero-size image. They only need the target application to process the image with rank-based filters (such as median, min, or max filters).
Root cause
ImagingExpand() attempts to replicate edges by reading the first pixel from empty image storage on zero-size images, triggering a null pointer dereference.
Affected systems
Pillow versions prior to 13.0.0
CVSS v4.0 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/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
Fix & remediation
Upgrade Pillow to version 13.0.0 or higher. If upgrading is delayed, reject or drop zero-size images before applying rank, median, min, or max filters.
$ pip install --upgrade 'Pillow>=13.0.0'AI-suggested. Run it in staging first and check it against the vendor advisory. Why?
NVD description
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's rank-based filters can dereference invalid image storage for a zero-size image. ImagingExpand() allocates a non-empty output and then faults while replicating edges by reading the first pixel from empty input storage; ImagingRankFilter is never reached. An attacker can supply or cause creation of a zero-size image to an application that applies a rank, median, minimum, or maximum filter. This causes a native process crash. This issue is fixed in version 13.0.0.