CVE-2026-42309
Pillow: Heap buffer overflow with nested list coordinates
CVE-2026-42309 is a medium vulnerability (CVSS 5.1) in Python Pillow, published May 4, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.13%, the 2nd percentile. Fixed in pillow 12.2.0.
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.1
Pillow: 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.
- Record
CVE-2026-42309- 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 - Weakness
- CWE-122
- Updated
- 2026-11-02
EUVDEUVD-2026-28901
5.1
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.
- Record
EUVD-2026-28901- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5xmw-vc9v-4wf2
5.1
Pillow has a heap buffer overflow with nested list coordinates
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 was introduced in Pillow 11.2.1.
- Record
GHSA-5xmw-vc9v-4wf2- 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 - Weakness
- CWE-122
- Updated
- 2026-11-02
NVD
5.1
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.
- Record
CVE-2026-42309- 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/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 - 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 - Weakness
- CWE-122
- Updated
- 2026-11-02
OSV
5.1
Pillow: 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.
- Record
CVE-2026-42309- 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 - Weakness
- CWE-122
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-42309
5.5
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.
- Record
DEBIAN-CVE-2026-42309- 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 - Updated
- 2026-11-02
Show 10 moreShow less
OSVGHSA-5xmw-vc9v-4wf2
5.1
Pillow has a heap buffer overflow with nested list coordinates
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 was introduced in Pillow 11.2.1.
- Record
GHSA-5xmw-vc9v-4wf2- 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 - Weakness
- CWE-122
- Updated
- 2026-11-02
OSVPYSEC-2026-2251
5.5
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.
- Record
PYSEC-2026-2251- 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 - Updated
- 2026-11-02
OSVROOT-APP-PYPI-CVE-2026-42309
5.5
CVE-2026-42309 in pillow - Patched by Root
Root has patched CVE-2026-42309 in the pillow package for Root:PyPI. Multiple fixed versions available.
- Record
ROOT-APP-PYPI-CVE-2026-42309- 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 - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-42309
5.1
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.
- Record
UBUNTU-CVE-2026-42309- 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 - Updated
- 2026-11-02
OSVBIT-pillow-2026-42309 No score
Pillow: 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.
- Record
BIT-pillow-2026-42309- Updated
- 2026-11-02
OSVCLSA-2026-1786515922 No score
TuxCare security update for pillow (9 CVEs)
TuxCare rebuilt pillow to address 9 CVEs. Fixed in 11.2.1.post4+tuxcare.
- Record
CLSA-2026-1786515922- Updated
- 2026-11-02
OSVCLSA-2026-1791446319 No score
TuxCare security update for pillow (1 CVE)
TuxCare rebuilt pillow to address 1 CVE. Fixed in 11.3.0.post6+tuxcare.
- Record
CLSA-2026-1791446319- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:20831-1 No score
Security update for python-Pillow
This update for python-Pillow fixes the following issues
- CVE-2026-42308: integer overflow in font processing can lead to denial of service (bsc#1265359).
- CVE-2026-42309: heap buffer overflow when processing nested list coordinates (bsc#1265153).
- CVE-2026-42310: infinite loop and resource exhaustion when processing specially crafted PDFs (bsc#1265154).
- Record
openSUSE-SU-2026:20831-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:21861-1 No score
Security update for python-Pillow
This update for python-Pillow fixes the following issues
- CVE-2026-42308: integer overflow in font processing can lead to denial of service (bsc#1265359).
- CVE-2026-42309: heap buffer overflow when processing nested list coordinates (bsc#1265153).
- CVE-2026-42310: infinite loop and resource exhaustion when processing specially crafted PDFs (bsc#1265154).
- Record
SUSE-SU-2026:21861-1- Updated
- 2026-11-02
OSVUSN-8399-1 No score
pillow vulnerabilities
It was discovered that Pillow incorrectly handled large glyph advance values in fonts. An attacker could possibly use this issue to cause Pillow to crash, resulting in a denial of service. (CVE-2026-42308)
It was discovered that Pillow incorrectly handled nested coordinate lists in certain APIs. An attacker could possibly use this issue to cause Pillow to crash, resulting in a denial of service. This issue only affected Ubuntu 25.10 and Ubuntu 26.04 LTS. (CVE-2026-42309)
It was discovered that Pillow incorrectly handled certain malformed PDF files. An attacker could possibly use this issue to cause Pillow to use excessive resources, leading to a denial of service. (CVE-2026-42310)
It was discovered that Pillow incorrectly handled certain malformed PSD files. An attacker could possibly use this issue to cause Pillow to crash, resulting in a denial of service, or to execute arbitrary code. This issue only affected Ubuntu 25.10 and Ubuntu 26.04 LTS. (CVE-2026-42311)
- Record
USN-8399-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pillowPyPI |
11.2.1 up to 12.2.0 | 12.2.0 |
pillowBitnami |
11.2.1 up to 12.2.0 | 12.2.0 |
pillowTuxCare:PyPI |
11.2.1 up to 11.2.1.post4+tuxcare, plus listed versions 11.2.1.post1+tuxcare11.2.1.post2+tuxcare11.2.1.post3+tuxcare |
11.2.1.post4+tuxcare |
pillowTuxCare:PyPI |
11.3.0 up to 11.3.0.post6+tuxcare, plus listed versions 11.3.0.post1+tuxcare11.3.0.post2+tuxcare11.3.0.post3+tuxcare11.3.0.post4+tuxcare11.3.0.post5+tuxcare |
11.3.0.post6+tuxcare |
pillowDebian:14 |
before 12.2.0-1, plus listed versions 11.1.0-511.2.1-111.3.0-112.0.0-112.1.0-112.1.1-112.1.1-2 |
12.2.0-1 |
pillowPyPI |
11.2.1 up to 12.2.0, plus listed versions 11.3.012.0.012.1.012.1.1 |
12.2.0 |
pillowRoot:PyPI |
before 12.1.0+aikido.5 | 12.1.0+aikido.512.1.0+aikido.611.2.1+aikido.212.1.0+aikido.712.1.0+aikido.811.2.1+aikido.312.1.0+aikido.912.1.0+aikido.1011.2.1+aikido.412.1.0+aikido.1111.2.1+aikido.512.1.0+aikido.1211.2.1+aikido.611.2.1+aikido.712.1.0+aikido.1311.2.1+aikido.812.1.0+aikido.1411.2.1+aikido.912.1.0+aikido.15 |
pillowUbuntu:25.10 |
before 11.3.0-1ubuntu1.3, plus listed versions 11.1.0-5build111.3.0-1ubuntu111.3.0-1ubuntu1.111.3.0-1ubuntu1.2 |
11.3.0-1ubuntu1.3 |
pillowUbuntu:26.04:LTS |
before 12.1.1-2ubuntu1.2, plus listed versions 11.3.0-1ubuntu111.3.0-1ubuntu212.0.0-1ubuntu112.1.1-1ubuntu112.1.1-2ubuntu112.1.1-2ubuntu1.1 |
12.1.1-2ubuntu1.2 |
pillowUbuntu:22.04:LTS |
before 9.0.1-1ubuntu0.4, plus listed versions 8.1.2+dfsg-0.39.0.0-19.0.1-19.0.1-1build19.0.1-1ubuntu0.19.0.1-1ubuntu0.29.0.1-1ubuntu0.3 |
9.0.1-1ubuntu0.4 |
pillowUbuntu:24.04:LTS |
before 10.2.0-1ubuntu1.2, plus listed versions 10.0.0-110.1.0-110.2.0-110.2.0-1build110.2.0-1ubuntu1 |
10.2.0-1ubuntu1.2 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-04 | facts | |
| 2026-11-02 | created | CVE List, EUVD, GitHub Advisories, NVD, OSV |
References
github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2
github.com/python-pillow/Pillow/releases/tag/12.2.0
nvd.nist.gov/vuln/detail/CVE-2026-42309
github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670
github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yaml
github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82
Show 17 moreShow less
github.com/advisories/GHSA-5xmw-vc9v-4wf2
github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42309.json
security-tracker.debian.org/tracker/CVE-2026-42309
github.com/python-pillow/Pillow
suse.com/support/update/announcement/2026/suse-su-202621861-1
bugzilla.suse.com/1265153
bugzilla.suse.com/1265154
bugzilla.suse.com/1265359
suse.com/security/cve/CVE-2026-42308
suse.com/security/cve/CVE-2026-42309
suse.com/security/cve/CVE-2026-42310
ubuntu.com/security/CVE-2026-42309
cve.org/CVERecord?id=CVE-2026-42309
ubuntu.com/security/notices/USN-8399-1
ubuntu.com/security/CVE-2026-42308
ubuntu.com/security/CVE-2026-42310
ubuntu.com/security/CVE-2026-42311