cve.bz

CVE-2026-42309 python pillow: Heap-based Buffer Overflow

5.1 mediumEPSS 0.1%Fix available

Medium (5.1) in python pillow. EPSS 0.1% estimated probability of exploitation activity in the next 30 days. Fixed in pillow 12.2.0.

On this page
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.

Severity

CVSS 4.0

5.1 medium
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.1% (unchanged from 0.1% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 3rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-05-11. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-122 Heap-based Buffer Overflow
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-42309 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-42309?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-42309?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-42309 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pillowfrom 11.2.1 before 12.2.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-5xmw-vc9v-4wf2PyPIpillow>=11.2.1 <12.2.012.2.0
PYSEC-2026-2251PyPIpillow>=11.2.1 <12.2.012.2.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian14pillow12.2.0-1DEBIAN-CVE-2026-42309
Ubuntu22.04:LTSpillow9.0.1-1ubuntu0.4USN-8399-1
Ubuntu24.04:LTSpillow10.2.0-1ubuntu1.2USN-8399-1
Ubuntu25.10pillow11.3.0-1ubuntu1.3UBUNTU-CVE-2026-42309 USN-8399-1
Ubuntu26.04:LTSpillow12.1.1-2ubuntu1.2UBUNTU-CVE-2026-42309 USN-8399-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This Moderate impact vulnerability in the Pillow Python imaging library could lead to a denial of service. Applications processing untrusted image data that utilize specific Pillow APIs, such as `ImagePath.Path`, `ImageDraw.ImageDraw.polygon`, or `ImageDraw.ImageDraw.line`, with specially crafted nested list coordinates are susceptible to a heap buffer overflow.

ProductPackageStateAdvisory
Red Hat AI Inference Server 3.3rhaiis/model-opt-cuda-rhel9:1778244559Fixed 2026-05-11RHSA-2026:16008
Red Hat AI Inference Server 3.3rhaiis/vllm-rocm-rhel9:1778244531Fixed 2026-05-11RHSA-2026:16009
Red Hat AI Inference Server 3.3rhaiis/vllm-cuda-rhel9:1778274666Fixed 2026-05-11RHSA-2026:16030
Red Hat AI Inference Server 3.4rhaii/vllm-spyre-rhel9:1787151840Fixed 2026-08-20RHSA-2026:57387
Exploit Intelligenceexploit-intelligence-tech-preview/vulnerability-analysis-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-ocp-rag-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-service-api-rhel9Fix deferred
Pen Drive Powered by Red Hat Lightspeedpen-drive/pen-drive-scanner-rhel9Fix deferred
Red Hat AI Inference Serverrhaiis/vllm-cpu-rhel9Fix deferred
Red Hat AI Inference Serverrhaiis/vllm-neuron-rhel9Fix deferred
Red Hat AI Inference Serverrhaiis/vllm-spyre-rhel9Fix deferred
Red Hat AI Inference Serverrhaiis/vllm-tpu-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-chatbot-rhel8Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/hub-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/lightspeed-chatbot-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform/automation-dashboard-rhel9Fix deferred
Red Hat Ansible Automation Platform 2python-pillowFix deferred
Red Hat Enterprise Linux 7python-pillowFix deferred
Red Hat Enterprise Linux 8python-pillowFix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-aws-cuda-rhel9Fix deferred
41 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-42309.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON