High severity8.2NVD Advisory· Published Jul 14, 2026· Updated Jul 21, 2026
CVE-2026-59197
CVE-2026-59197
Description
Pillow is a Python imaging library. Prior to 12.3.0, Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size because ImageFilter.RankFilter.filter() calls image.expand(size // 2, size // 2) before rank-filter size validation and ImagingExpand() computes output dimensions with unchecked signed int arithmetic. This issue is fixed in version 12.3.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
PillowPyPI | < 12.3.0 | 12.3.0 |
Affected products
24cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*+ 1 more
- cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*range: <12.3.0
- (no CPE)range: <12.3.0
- osv-coords22 versionspkg:apk/chainguard/label-studiopkg:apk/chainguard/lmcache-cuda-12.8pkg:apk/chainguard/mlflowpkg:apk/chainguard/openstack-horizon-2025.2pkg:apk/chainguard/openstack-horizon-2025.2-fipspkg:apk/chainguard/openstack-horizon-2026.1pkg:apk/chainguard/openstack-horizon-2026.1-fipspkg:apk/chainguard/superset-6.0pkg:apk/chainguard/superset-6.1pkg:apk/chainguard/superset-fips-6.1pkg:apk/chainguard/tensorflow-gpu-jupyterpkg:apk/chainguard/text-generation-inferencepkg:apk/chainguard/tritonserver-backend-vllm-cuda-13.0pkg:apk/wolfi/mlflowpkg:apk/wolfi/superset-6.0pkg:apk/wolfi/superset-6.1pkg:bitnami/pillowpkg:rpm/almalinux/python3-pillowpkg:rpm/almalinux/python3-pillow-develpkg:rpm/almalinux/python3-pillow-docpkg:rpm/almalinux/python3-pillow-tkpkg:rpm/opensuse/python-Pillow&distro=openSUSE%20Leap%2016.0
< 1.23.0-r11+ 21 more
- (no CPE)range: < 1.23.0-r11
- (no CPE)range: < 0.5.3-r0
- (no CPE)range: < 3.14.0-r2
- (no CPE)range: < 25.5.2_git20260617-r4
- (no CPE)range: < 25.5.2_git20260617-r5
- (no CPE)range: < 25.7.3_git20260630-r2
- (no CPE)range: < 25.7.3_git20260630-r2
- (no CPE)range: < 6.0.0-r13
- (no CPE)range: < 6.1.0-r6
- (no CPE)range: < 6.1.0-r5
- (no CPE)range: < 2.21.0-r7
- (no CPE)range: < 3.3.7-r20
- (no CPE)range: < 25.11-r11
- (no CPE)range: < 3.14.0-r2
- (no CPE)range: < 6.0.0-r13
- (no CPE)range: < 6.1.0-r6
- (no CPE)range: < 12.3.0
- (no CPE)range: < 5.1.1-23.el8_10
- (no CPE)range: < 5.1.1-23.el8_10
- (no CPE)range: < 5.1.1-23.el8_10
- (no CPE)range: < 5.1.1-23.el8_10
- (no CPE)range: < 11.3.0-160000.8.1
Patches
Vulnerability mechanics
References
6- github.com/python-pillow/Pillow/commit/cce3bdb867c77a3420261ed1bfdb6b0787ec8fc1nvdPatchWEB
- github.com/python-pillow/Pillow/pull/9695nvdIssue TrackingPatchWEB
- github.com/python-pillow/Pillow/security/advisories/GHSA-xj96-63gp-2gmrnvdExploitVendor AdvisoryWEB
- github.com/advisories/GHSA-xj96-63gp-2gmrghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-59197ghsaADVISORY
- github.com/python-pillow/Pillow/releases/tag/12.3.0nvdRelease NotesWEB
News mentions
0No linked articles in our index yet.