CVE-2026-42309
MEDIUM 5.1CVSS 4.0Pillow has a heap buffer overflow with nested list coordinates
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.
- Published
- 9 May 2026
- Last modified
- 19 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-122
- Also known as
- BIT-pillow-2026-42309GHSA-5xmw-vc9v-4wf2PYSEC-2026-2251
- Sources
- NVDJSONOSV GHSA-5xmw-vc9v-4wf2JSONOSV PYSEC-2026-2251JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.1 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | python | pillowcpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* |
>= 11.2.1, < 12.2.0 | 12.2.0 |
| OSV | PyPI | pillow | >= 11.2.1, < 12.2.0 | 12.2.0 |
References
- https://github.com/python-pillow/Pillow/releases/tag/12.2.0 · Product, Release Notes, WEB, ADVISORY
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2 · Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-42309 · ADVISORY
- https://github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82 · WEB
- https://github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yaml · WEB
- https://github.com/python-pillow/Pillow · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 9 May 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 9 May 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 4 May 2026)