Pillow: Heap buffer overflow with nested list coordinates
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 2 fixed, 11 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
Pillow is a Python imaging library. From version 11.2.1 to before version 12.2.0, passing nested lists as coordinates to APIs that accept coordinates such as ImagePath.Path, ImageDraw.ImageDraw.polygon and ImageDraw.ImageDraw.line could cause a heap buffer overflow, as nested lists were recursively unpacked beyond the allocated buffer. Coordinate lists are now validated to contain exactly two numeric coordinates. This issue has been patched in version 12.2.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-pillow | Pillow | 11.2.1 to before 12.2.0 | 12.2.0 | Patch available | CNA |
| — | pillow (PyPI) | 11.2.1 to before 12.2.0 | 12.2.0 | Patch available | GHSA-5xmw-vc9v-4wf2 |
- Pillow Vendorpython-pillow Affected 11.2.1 to before 12.2.0 Fixed in 12.2.0 Patch available CNA
- pillow (PyPI) Vendor— Affected 11.2.1 to before 12.2.0 Fixed in 12.2.0 Patch available GHSA-5xmw-vc9v-4wf2
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* | 11.2.1 to before 12.2.0 | Vulnerable | python-pillow |
- cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* Versions 11.2.1 to before 12.2.0 Vulnerable ·python-pillow
Remediation
- Fix · CNA Pillow (python-pillow) Fixed in 12.2.0
- Fix · GHSA-5xmw-vc9v-4wf2 pillow (PyPI) Fixed in 12.2.0 Advisory →
Red Hat 4 advisories
- RHSA-2026:57387 Released 2026-08-20 · Red Hat rating ImportantRed Hat AI Inference 3.4.4 (spyre)
- Red Hat AI Inference Server 3.4 registry.redhat.io/rhaii/vllm-spyre-rhel9
- RHSA-2026:16030 Released 2026-05-11 · Red Hat rating ImportantRed Hat AI Inference Server 3.3.3 (CUDA)
- Red Hat AI Inference Server 3.3 registry.redhat.io/rhaiis/vllm-cuda-rhel9
- RHSA-2026:16009 Released 2026-05-11 · Red Hat rating ImportantRed Hat AI Inference Server 3.3.3 (ROCm)
- Red Hat AI Inference Server 3.3 registry.redhat.io/rhaiis/vllm-rocm-rhel9
Show 1 more Red Hat advisories
- RHSA-2026:16008 Released 2026-05-11 · Red Hat rating ImportantRed Hat AI Inference Server Model Optimization Tools 3.3.3 (CUDA)
- Red Hat AI Inference Server 3.3 registry.redhat.io/rhaiis/model-opt-cuda-rhel9
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Exploit Intelligence | Affected | No fix yet: Fix deferred |
| OpenShift Lightspeed | Affected | No fix yet: Fix deferred |
| Pen Drive Powered by Red Hat Lightspeed | Affected | No fix yet: Fix deferred |
| Red Hat AI Inference Server | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 7 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
| Red Hat Quay 3 | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
| Red Hat AI Inference Server 3.3 | Fixed | RHSA-2026:16008, RHSA-2026:16009, RHSA-2026:16030 |
| Red Hat AI Inference Server 3.4 | Fixed | RHSA-2026:57387 |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-42309
- 2026-10-03 Alias added: GHSA-5xmw-vc9v-4wf2
- 2026-10-20 3 new references · GHSA-5xmw-vc9v-4wf2
References
Advisory 2
Other 5
- https://github.com/python-pillow/Pillow/releases/tag/12.2.0
- https://github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82
- https://github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670
- https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yaml
- https://github.com/python-pillow/Pillow
More python-pillow Pillow vulnerabilities
- TI-2026-76627 Out-of-bounds read in Pillow TIFF encoder ColorMap handling CVSS 4.0HIGH 8.8
- TI-2026-76625 Quadratic-time denial of service in Pillow PDF save_all CVSS 4.0HIGH 8.7
- TI-2026-76605 NULL pointer dereference in Pillow's Image.merge function CVSS 4.0HIGH 8.7
- TI-2026-76604 Out-of-bounds read in Pillow TIFF decoding leaks heap memory CVSS 4.0HIGH 8.8
- TI-2026-76602 Double free in Pillow ImagingScaleAffine on allocation failure CVSS 4.0HIGH 8.7
- TI-2026-76600 GIF seek in Pillow keeps rejected size, allowing denial of service CVSS 4.0HIGH 8.7
Sources
- CVE-2026-42309 · CVE Program
- CVE-2026-42309 · NVD
- FIRST EPSS
- GHSA-5xmw-vc9v-4wf2 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-42309 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences