CVE-2026-42309
Pillow: Heap buffer overflow with nested list coordinates
Reported by github_m · Published May 9, 2026
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| open-webui | Wolfi | 0.11.0-r0 |
| open-webui | Chainguard | 0.11.0-r0 |
| kubeflow-pipelines-visualization-server | Chainguard | 2.16.1-r0 |
| kubeflow-pipelines-visualization-server | Wolfi | 2.16.1-r0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| python-pillow | Pillow | >= 11.2.1, < 12.2.0 |
| wolfi | open-webui | 0 |
| chainguard | open-webui | 0 |
| chainguard | kubeflow-pipelines-visualization-server | 0 |
| wolfi | kubeflow-pipelines-visualization-server | 0 |
| python-pillow | Pillow | 11.2.1 |
| PyPI | Pillow | 11.2.1 |
| wolfi | superset-6.0 | 0 |
| python-pillow | Pillow | |
| wolfi | mlflow | 0 |
| chainguard | superset-6.0 | 0 |
| chainguard | mlflow | 0 |
Timeline
- May 4, 2026 CVE Published
- May 9, 2026 Security Advisory (2 in total, the first dated here)
- May 18, 2026 EPSS Score (26 in total, the first dated here)
- Aug 4, 2026 Coalition ESS Score
- Aug 12, 2026 Distribution Patch
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-42309
vulnetix vdb fixes CVE-2026-42309
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-42309/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2 x_refsource_CONFIRM
- https://github.com/python-pillow/Pillow/releases/tag/12.2.0 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2026-42309 advisory
- https://github.com/advisories/GHSA-5xmw-vc9v-4wf2 advisory
- https://github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670 patch
- https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yaml advisory
- https://github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82 patch
- https://github.com/python-pillow/Pillow url