Every CVE Search/ Get API key

CVE-2026-42309

Pillow: Heap buffer overflow with nested list coordinates

5.1 MediumFix available

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

0.13%Up 0.1 points since May 9, 2026
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
pillow
PyPI
11.2.1 up to 12.2.0
12.2.0
pillow
Bitnami
11.2.1 up to 12.2.0
12.2.0
pillow
TuxCare: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
pillow
TuxCare: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
pillow
Debian: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
pillow
PyPI
11.2.1 up to 12.2.0, plus listed versions
11.3.012.0.012.1.012.1.1
12.2.0
pillow
Root: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
pillow
Ubuntu: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
pillow
Ubuntu: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
pillow
Ubuntu: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
pillow
Ubuntu: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

History
WhenChangedSources
2026-11-04facts
2026-11-02createdCVE List, EUVD, GitHub Advisories, NVD, OSV

References

Show 17 moreShow less
MoveEnter Open