CVE-2026-59197 json
Pillow: Heap out-of-bounds write in Pillow `ImageFilter.RankFilter` via integer overflow in `ImagingExpand`
published 2026-07-14 3 mo ago modified 2026-10-24 15 d ago also BIT-pillow-2026-59197 , EUVD-2026-43734 , GHSA-xj96-63gp-2gmr , PYSEC-2026-3454
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 38%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pillow 12.3.0
- bitnami pillow 12.3.0
- python pillow 12.3.0
- pillow Debian 14 12.3.0-1
debian advisories DEBIAN-CVE-2026-59197
- pillow Ubuntu 22.04 LTS 9.0.1-1ubuntu0.6
- pillow Ubuntu 24.04 LTS 10.2.0-1ubuntu1.4
- pillow Ubuntu 26.04 LTS 12.1.1-2ubuntu1.4
ubuntu advisories UBUNTU-CVE-2026-59197
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- receptor ansible automation platform inside 2.5, ansible automation platform developer 2.5, ansible automation platform 2.5 1.6.7-1.el8ap
- receptor ansible automation platform inside 2.6, ansible automation platform inside 2.5, ansible automation platform developer 2.6 +3 more 1.6.7-1.el9ap
- receptorctl ansible automation platform inside 2.5, ansible automation platform developer 2.5, ansible automation platform 2.5 1.6.7-1.el8ap
- receptorctl ansible automation platform inside 2.6, ansible automation platform inside 2.5, ansible automation platform developer 2.6 +3 more 1.6.7-1.el9ap
- python3.12-daphne ansible automation platform 2.5 4.2.2-1.el8ap
- python3.12-daphne ansible automation platform 2.6, ansible automation platform 2.5 4.2.2-1.el9ap
- python3.12-pillow ansible automation platform 2.5 12.3.0-1.el8ap
- python3.12-pillow ansible automation platform 2.6, ansible automation platform 2.5 12.3.0-1.el9ap
red hat advisories RHSA-2026:54528RHSA-2026:54417RHSA-2026:52551RHSA-2026:50319RHSA-2026:50336RHSA-2026:50223
- python-Pillow SLES 16.0, SLES for SAP applications 16.0 11.3.0-160000.8.1
- python-Pillow SLES for SAP 15 SP6, SLES for SAP 15 SP5, SLES for SAP 15 SP4 +8 more 9.5.0-150400.5.25.1
- python-Pillow SLE Module for Package Hub 15 SP7 7.2.0-150300.3.30.1
suse advisories SUSE-SU-2026:23217-1SUSE-SU-2026:23228-1SUSE-SU-2026:3268-1SUSE-SU-2026:3084-1
- python-Pillow openSUSE Leap 16.0 11.3.0-160000.8.1
opensuse advisories openSUSE-SU-2026:21544-1
- python3-pillow AlmaLinux 8 5.1.1-23.el8_10
- python3-pillow-tk AlmaLinux 8 5.1.1-23.el8_10
almalinux advisories ALSA-2026:48021
- python-pillow Rocky Linux 8 5.1.1-23.el8_10
rocky linux advisories RLSA-2026:48021
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-59197 updated cvss 8.2
Pillow: Pillow: Native heap out-of-bounds write
-
Red Hat Exploit Intelligence exploit-intelligence-tech-preview/vulnerability-analysis-rhel9 Red Hat Lightspeed Core lightspeed-core/rag-tool-cpu-rhel9, lightspeed-core/lightspeed-stack-rhel9, lightspeed-core/rag-tool-cuda-12.9-rhel9 Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-service-api-rhel9affected: no fix available
-
Red Hat AI Inference Server rhaii/vllm-tpu-rhel9, rhaiis/vllm-cpu-rhel9, rhaiis/vllm-tpu-rhel9, rhaii/vllm-gaudi-rhel9, rhaiis/vllm-cuda-rhel9, rhaiis/vllm-rocm-rhel9, +4 moreaffected: no fix available, no fix planned “Will not fix”
-
Red Hat Ansible Automation Platform 2 ansible-automation-platform-25/lightspeed-chatbot-rhel8affected: no fix available
-
Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-gaudi-rhel9affected: no fix planned “Will not fix”
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-vllm-gaudi-rhel9, rhoai/odh-llama-stack-core-rhel9, rhoai/odh-caikit-tgis-serving-rhel9, rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9 Red Hat Satellite 6 python-pillow 12.2.0-1.el8pcaffected: no fix available
-
Red Hat AI Inference Server 3.4 rhaii/vllm-cpu-rhel9 1789681128, rhaii/vllm-cpu-rhel9 1790075793, rhaii/vllm-cuda-rhel9 1789681126, rhaii/vllm-cuda-rhel9 1790090131, rhaii/vllm-rocm-rhel9 1789681126, rhaii/vllm-rocm-rhel9 1790109620, +4 morefixed: vendor fix RHSA-2026:70996
-
Red Hat Ansible Automation Platform 2.5 for RHEL 8 python3.12-pillow 12.3.0-1.el8ap Red Hat Ansible Automation Platform 2.5 for RHEL 9 python3.12-pillow 12.3.0-1.el9apfixed: vendor fix RHSA-2026:50319
-
Red Hat Ansible Automation Platform 2.6 ansible-automation-platform-26/hub-rhel9 1785753568, ansible-automation-platform-26/lightspeed-chatbot-rhel9 1785646188fixed: vendor fix RHSA-2026:50479
show 24 moreshow fewer
-
Red Hat Ansible Automation Platform 2.6 for RHEL 9 python3.12-pillow 12.3.0-1.el9apfixed: vendor fix RHSA-2026:50336
-
Red Hat Ansible Automation Platform 2.7 ansible-automation-platform-27/hub-rhel9 1785376164, ansible-automation-platform-27/lightspeed-chatbot-rhel9 1785426734fixed: vendor fix RHSA-2026:50340
-
Red Hat Enterprise Linux AI 3.4 rhelai3/bootc-cuda-rhel9 1790868254, rhelai3/bootc-rocm-rhel9 1790614447, rhelai3/bootc-aws-cuda-rhel9 1790881122, rhelai3/bootc-gcp-cuda-rhel9 1790881123, rhelai3/disk-image-cuda-rhel9 1790957417, rhelai3/bootc-azure-cuda-rhel9 1790881120, +1 morefixed: vendor fix RHSA-2026:76150
-
Red Hat Enterprise Linux AppStream (v. 8) python-pillow 5.1.1-23.el8_10, python3-pillow 5.1.1-23.el8_10fixed: vendor fix RHSA-2026:48021
-
Red Hat Enterprise Linux AppStream AUS (v.8.4) python-pillow 5.1.1-15.el8_4.2, python3-pillow 5.1.1-15.el8_4.2fixed: vendor fix RHSA-2026:52551
-
Red Hat Enterprise Linux AppStream AUS (v.8.6) python-pillow 5.1.1-20.el8_6.1, python3-pillow 5.1.1-20.el8_6.1fixed: vendor fix RHSA-2026:54528
-
Red Hat Enterprise Linux AppStream E4S (v.8.8) python-pillow 5.1.1-20.el8_8.1, python3-pillow 5.1.1-20.el8_8.1fixed: vendor fix RHSA-2026:54417
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.4) python-pillow 5.1.1-15.el8_4.2, python3-pillow 5.1.1-15.el8_4.2fixed: vendor fix RHSA-2026:52551
-
Red Hat Enterprise Linux AppStream EUS EXTENSION (v.8.6) python-pillow 5.1.1-20.el8_6.1, python3-pillow 5.1.1-20.el8_6.1fixed: vendor fix RHSA-2026:54528
-
Red Hat Enterprise Linux AppStream TUS (v.8.8) python-pillow 5.1.1-20.el8_8.1, python3-pillow 5.1.1-20.el8_8.1fixed: vendor fix RHSA-2026:54417
-
Red Hat Enterprise Linux CRB (v. 8) python3-pillow 5.1.1-23.el8_10, python3-pillow-tk 5.1.1-23.el8_10fixed: vendor fix RHSA-2026:48021
-
Red Hat OpenShift AI 3.3 rhoai/odh-mlflow-rhel9 1789653606, rhoai/odh-llm-d-inference-scheduler-rhel9 1789662430fixed: vendor fix RHSA-2026:73987
-
Red Hat OpenShift AI 3.4 rhoai/odh-automl-rhel9 1786612415, rhoai/odh-mlflow-rhel9 1787226790, rhoai/odh-autorag-rhel9 1786612637, rhoai/odh-llm-d-kv-cache-rhel9 1787169432, rhoai/odh-openvino-model-server-rhel9 1787303251, rhoai/odh-th06-cpu-torch210-py312-rhel9 1787076778, +18 morefixed: vendor fix RHSA-2026:60520
-
Red Hat Quay 3.9 quay/quay-rhel8 1785950004fixed: vendor fix RHSA-2026:50931
-
Red Hat Quay 3.10 quay/quay-rhel8 1786395065fixed: vendor fix RHSA-2026:53520
-
Red Hat Quay 3.12 quay/quay-rhel8 1786170635fixed: vendor fix RHSA-2026:52968
-
Red Hat Quay 3.14 quay/quay-rhel8 1788593843fixed: vendor fix RHSA-2026:70267
-
Red Hat Quay 3.15 quay/quay-rhel8 1785261506fixed: vendor fix RHSA-2026:48933
-
Red Hat Quay 3.16 quay/quay-rhel9 1789563753fixed: vendor fix RHSA-2026:69255
-
Red Hat Quay 3.17 quay/quay-rhel9 1786181981fixed: vendor fix RHSA-2026:54395
-
Red Hat Quay 3.18 quay/quay-rhel9 1791265590fixed: vendor fix RHSA-2026:81110
-
Red Hat Satellite 6.16 for RHEL 8 python-pillow 12.3.0-1.el8pc, python3.11-pillow 12.3.0-1.el8pc Red Hat Satellite 6.16 for RHEL 9 python-pillow 12.3.0-1.el9pc, python3.11-pillow 12.3.0-1.el9pcfixed: vendor fix RHSA-2026:50223
-
Red Hat OpenShift Lightspeed openshift-lightspeed/lightspeed-ocp-rag-rhel9, openshift-lightspeed-tech-preview/lightspeed-rag-tool-rhel9not affected: vulnerable code not in execute path
-
Red Hat Ansible Automation Platform 2 python-pillow 10.3.0-1.el9ap Red Hat Ansible Automation Platform 2.5 for RHEL 8 receptor 1.6.7-1.el8ap, receptorctl 1.6.7-1.el8ap, automation-hub 4.10.17-1.el8ap, python3.12-daphne 4.2.2-1.el8ap, python3.12-pyasn1 0.6.4-1.el8ap, python3.12-aiohttp 3.14.1-2.el8ap, +17 more Red Hat Ansible Automation Platform 2.5 for RHEL 9 receptor 1.6.7-1.el9ap, receptorctl 1.6.7-1.el9ap, automation-hub 4.10.17-1.el9ap, python3.12-daphne 4.2.2-1.el9ap, python3.12-pyasn1 0.6.4-1.el9ap, python3.12-aiohttp 3.14.1-2.el9ap, +17 more Red Hat Ansible Automation Platform 2.6 ansible-automation-platform-26/gateway-rhel9 1785780020, ansible-automation-platform-26/hub-web-rhel9 1785756951, ansible-automation-platform-26/receptor-rhel9 1785632117, ansible-automation-platform-26/mcp-tools-rhel9 1785633968, ansible-automation-platform-26/controller-rhel9 1785753810, ansible-automation-platform-26/de-minimal-rhel9 1785647559, +23 morenot affected: vulnerable code not present
17 more not affected in the full advisory
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 3 mo ago
Exploit prediction
0.45% chance of exploitation in the next 30 days, higher than 38% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/python-pillow/Pillow/security/advisories/GHSA-xj96-63gp-2gmr referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H |
| OSV | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pillow | <12.3.0 |
12.3.0 |
| bitnami | pillow | <12.3.0 |
12.3.0 |
Affected products
- python-pillow Pillow
Classification
References
-
github.com
/python-pillow/Pillow/pull/9695
web, issue-tracking, patch
-
github.com
/python-pillow/Pillow/commit/cce3bdb867c77a3420261ed1bfdb6b0787ec8fc1
web, patch
-
github.com
/python-pillow/Pillow/security/advisories/GHSA-xj96-63gp-2gmr
exploit, web, vendor-advisory, advisory, evidence
-
github.com
/python-pillow/Pillow/releases/tag/12.3.0
web, release-notes, article, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-59197
advisory, web
-
github.com
/python-pillow/Pillow
package
Sources
- CVE List CVE-2026-59197
- GitHub Advisory GHSA-xj96-63gp-2gmr
- NVD CVE-2026-59197
- OSV BIT-pillow-2026-59197
- OSV PYSEC-2026-3454
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.