Every CVESearch/Get API key

CVE-2026-128066

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

Explain with AI
ChatGPTClaudeGoogle AI
Severity
8.7High
Network attack, no privileges, no user interactionCVSS 4.0, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.49% in 30 days
Percentile43rd
EPSS, scored
Listed fix
13.0.0 for pillow (PyPI)
From GitHub Advisories and OSV23 other affected packages

Overview

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

CVSS 4.0 vector

Exploitability

Attack vector
Network
Complexity
Low
Attack requirements
None
Privileges needed
None
User interaction
None

Impact on the vulnerable system

Confidentiality
None
Integrity
None
Availability
High

Impact on subsequent systems

Confidentiality
None
Integrity
None
Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Exploit chance over time

Up 0.1 points since Nov 13, 2026
EPSS score, scored every day from Nov 13, 2026 to Dec 4, 2026: lowest 0.38% on Nov 13, 2026, highest 0.52% on Nov 25, 2026, 0.49% on the last day.

Affected

Packages 24

Affected packages
PackageAffectedFixed
pillow
PyPI
through 12.3.0
13.0.0
before 13.0.0, plus listed versions
1.01.11.21.31.4
Show 45 more versionsShow less
1.51.61.7.01.7.11.7.21.7.31.7.41.7.51.7.61.7.71.7.810.0.010.0.110.1.010.2.010.3.010.4.011.0.011.1.011.2.111.3.012.0.012.1.012.1.112.2.012.3.02.0.02.1.02.2.02.2.12.2.22.3.02.3.12.3.22.4.02.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.8.02.8.1
13.0.0
pillow
Bitnami
1.0.0 up to 13.0.0
13.0.0
datascience-notebook
Docker Hardened Images:Debian:13
before 2026.07.28-7, plus listed versions
2026.07.28-02026.07.28-12026.07.28-22026.07.28-32026.07.28-42026.07.28-52026.07.28-6
2026.07.28-7
litellm
Docker Hardened Images:Debian:13
1.95.0-0 and later, plus listed versions
1.100.0-01.100.1-01.101.0-01.101.0-11.102.0-0
Show 45 more versionsShow less
1.103.0-01.103.0-11.103.2-01.103.3-01.104.1-01.104.2-01.104.3-01.105.1-01.106.0-01.106.0-11.106.0-21.106.0-31.106.0-41.106.0-51.106.0-61.106.0-71.106.0-81.106.0-91.108.0-01.108.0-11.108.1-01.108.1-11.108.3-01.108.3-11.108.4-01.108.4-11.108.4-21.109.0-01.109.1-01.109.1-11.110.0-01.110.0-11.110.1-01.110.2-01.110.2-11.110.2-21.110.3-01.110.3-11.111.0-01.111.1-01.112.0-01.112.0-11.112.1-01.112.1-11.112.2-0
None listed
mlflow
Docker Hardened Images:Debian:13
3.15.1-0 up to 3.17.2-1, plus listed versions
3.15.2-03.15.2-13.15.2-23.16.0-03.16.1-0
Show 10 more versionsShow less
3.16.1-13.16.1-23.16.1-33.16.1-43.16.1-53.16.1-63.17.0-03.17.0-13.17.1-03.17.2-0
3.17.2-1
netbox
Docker Hardened Images:Debian:13
4.6.7-0 and later, plus listed versions
4.6.10-04.6.10-14.6.8-04.6.8-14.6.8-2
Show 34 more versionsShow less
4.6.8-34.6.9-04.6.9-14.6.9-24.7.1-04.7.1-14.7.1-24.7.1-34.7.1-44.7.1-54.7.1-64.7.2-04.7.2-14.7.2-24.7.2-34.7.2-44.7.3-04.7.3-14.7.3-24.7.3-34.7.3-44.7.4-04.7.4-14.7.4-24.7.4-34.7.4-44.7.4-54.7.4-64.7.5-04.7.5-14.7.5-24.7.6-04.7.6-14.7.6-2
None listed
pytorch-2.11-cuda12.8-python3.11
Docker Hardened Images:Debian:13
2.11.0-0 and later, plus listed versions
2.11.0-12.11.0-102.11.0-112.11.0-122.11.0-2
Show 7 more versionsShow less
2.11.0-32.11.0-42.11.0-52.11.0-62.11.0-72.11.0-82.11.0-9
None listed
pytorch-2.11-cuda12.9-python3.12
Docker Hardened Images:Debian:13
2.11.0-0 and later, plus listed versions
2.11.0-12.11.0-102.11.0-112.11.0-122.11.0-2
Show 7 more versionsShow less
2.11.0-32.11.0-42.11.0-52.11.0-62.11.0-72.11.0-82.11.0-9
None listed
pytorch-2.11-cuda13.0-python3.11
Docker Hardened Images:Debian:13
2.11.0-0 and later, plus listed versions
2.11.0-12.11.0-102.11.0-112.11.0-122.11.0-2
Show 7 more versionsShow less
2.11.0-32.11.0-42.11.0-52.11.0-62.11.0-72.11.0-82.11.0-9
None listed
Show 15 more packagesShow less
Affected packages
PackageAffectedFixed
pytorch-2.13-cuda12.6-python3.11
Docker Hardened Images:Debian:13
2.13.0-0 and later, plus listed versions
2.13.0-12.13.0-102.13.0-112.13.0-122.13.0-2
Show 7 more versionsShow less
2.13.0-32.13.0-42.13.0-52.13.0-62.13.0-72.13.0-82.13.0-9
None listed
pytorch-2.13-cuda13.0-python3.12
Docker Hardened Images:Debian:13
2.13.0-0 and later, plus listed versions
2.13.0-12.13.0-102.13.0-112.13.0-122.13.0-2
Show 7 more versionsShow less
2.13.0-32.13.0-42.13.0-52.13.0-62.13.0-72.13.0-82.13.0-9
None listed
pytorch-2.7-cuda12.8-python3.12
Docker Hardened Images:Debian:13
2.7.0-0 and later, plus listed versions
2.7.0-12.7.0-22.7.0-32.7.0-42.7.0-5
Show 7 more versionsShow less
2.7.0-62.7.0-72.7.0-82.7.1-02.7.1-12.7.1-22.7.1-3
None listed
pytorch-2.9-cuda12.9-python3.12
Docker Hardened Images:Debian:13
2.9.1-0 and later, plus listed versions
2.9.1-12.9.1-102.9.1-112.9.1-122.9.1-2
Show 7 more versionsShow less
2.9.1-32.9.1-42.9.1-52.9.1-62.9.1-72.9.1-82.9.1-9
None listed
superset
Docker Hardened Images:Debian:13
before 6.1.0-22, plus listed versions
6.1.0-06.1.0-16.1.0-106.1.0-116.1.0-12
Show 17 more versionsShow less
6.1.0-136.1.0-146.1.0-156.1.0-166.1.0-176.1.0-186.1.0-196.1.0-26.1.0-206.1.0-216.1.0-36.1.0-46.1.0-56.1.0-66.1.0-76.1.0-86.1.0-9
6.1.0-22
python-pillow
openEuler:22.03-LTS-SP4
before 9.0.1-19.oe2203sp4
9.0.1-19.oe2203sp4
pillow
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
2.2.1-1ubuntu22.2.1-2ubuntu12.2.1-3ubuntu22.2.1-3ubuntu32.2.1-3ubuntu4
Show 13 more versionsShow less
2.2.1-3ubuntu62.3.0-1ubuntu12.3.0-1ubuntu22.3.0-1ubuntu32.3.0-1ubuntu3.22.3.0-1ubuntu3.32.3.0-1ubuntu3.42.3.0-1ubuntu3.4+esm12.3.0-1ubuntu3.4+esm22.3.0-1ubuntu3.4+esm32.3.0-1ubuntu3.4+esm42.3.0-1ubuntu3.4+esm52.3.0-1ubuntu3.4+esm6
None listed
pillow
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
2.9.0-13.0.0-13.0.0-1build13.1.0-13.1.1-1
Show 10 more versionsShow less
3.1.2-0ubuntu13.1.2-0ubuntu1.13.1.2-0ubuntu1.33.1.2-0ubuntu1.43.1.2-0ubuntu1.53.1.2-0ubuntu1.63.1.2-0ubuntu1.6+esm13.1.2-0ubuntu1.6+esm23.1.2-0ubuntu1.6+esm33.1.2-0ubuntu1.6+esm4
None listed
pillow
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
4.1.1-3build24.3.0-2ubuntu15.0.0-15.1.0-15.1.0-1ubuntu0.2
Show 9 more versionsShow less
5.1.0-1ubuntu0.35.1.0-1ubuntu0.45.1.0-1ubuntu0.55.1.0-1ubuntu0.65.1.0-1ubuntu0.75.1.0-1ubuntu0.85.1.0-1ubuntu0.8+esm15.1.0-1ubuntu0.8+esm25.1.0-1ubuntu0.8+esm3
None listed
pillow
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
6.1.0-16.1.0-1build16.2.1-27.0.0-47.0.0-4build1
Show 11 more versionsShow less
7.0.0-4ubuntu0.17.0.0-4ubuntu0.27.0.0-4ubuntu0.37.0.0-4ubuntu0.47.0.0-4ubuntu0.57.0.0-4ubuntu0.67.0.0-4ubuntu0.77.0.0-4ubuntu0.87.0.0-4ubuntu0.97.0.0-4ubuntu0.9+esm17.0.0-4ubuntu0.9+esm2
None listed
pillow-python2
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
6.2.1-3~build16.2.1-36.2.1-3ubuntu0.1~esm16.2.1-3ubuntu0.1~esm2
None listed
pillow
Ubuntu:22.04:LTS
All versions, plus listed versions
8.1.2+dfsg-0.39.0.0-19.0.1-19.0.1-1build19.0.1-1ubuntu0.1
Show 6 more versionsShow less
9.0.1-1ubuntu0.29.0.1-1ubuntu0.39.0.1-1ubuntu0.49.0.1-1ubuntu0.59.0.1-1ubuntu0.69.0.1-1ubuntu0.7
None listed
pillow
Ubuntu:24.04:LTS
All versions, plus listed versions
10.0.0-110.1.0-110.2.0-110.2.0-1build110.2.0-1ubuntu1
Show 4 more versionsShow less
10.2.0-1ubuntu1.210.2.0-1ubuntu1.310.2.0-1ubuntu1.410.2.0-1ubuntu1.5
None listed
pillow
Ubuntu:26.10
All versions, plus listed versions
12.1.1-2ubuntu112.3.0-1ubuntu112.3.0-1ubuntu212.3.0-1ubuntu2.1
None listed
pillow
Ubuntu:26.04:LTS
All versions, plus listed versions
11.3.0-1ubuntu111.3.0-1ubuntu212.0.0-1ubuntu112.1.1-1ubuntu112.1.1-2ubuntu1
Show 6 more versionsShow less
12.1.1-2ubuntu1.112.1.1-2ubuntu1.212.1.1-2ubuntu1.312.1.1-2ubuntu1.412.1.1-2ubuntu1.512.1.1-2ubuntu1.6
None listed

The JSON record also has 67 more versions.

Only in multi-CVE advisories 9

Each of these advisories covers several CVEs at once, so it doesn’t establish that this one affects the package.

Packages named only by advisories that cover several CVEs
PackageAffectedFixed
pillow
TuxCare:PyPI
11.3.0.post0 up to 11.3.0.post14+tuxcare, plus listed versions
From an advisory covering 2 CVEs
11.3.011.3.0.post1+tuxcare11.3.0.post10+tuxcare11.3.0.post11+tuxcare11.3.0.post12+tuxcare
Show 9 more versionsShow less
11.3.0.post13+tuxcare11.3.0.post2+tuxcare11.3.0.post3+tuxcare11.3.0.post4+tuxcare11.3.0.post5+tuxcare11.3.0.post6+tuxcare11.3.0.post7+tuxcare11.3.0.post8+tuxcare11.3.0.post9+tuxcare
11.3.0.post14+tuxcare
8.4.0.post0 up to 8.4.0.post17+tuxcare, plus listed versions
From an advisory covering 2 CVEs
8.4.08.4.0.post1+tuxcare8.4.0.post10+tuxcare8.4.0.post11+tuxcare8.4.0.post12+tuxcare
Show 12 more versionsShow less
8.4.0.post13+tuxcare8.4.0.post14+tuxcare8.4.0.post15+tuxcare8.4.0.post16+tuxcare8.4.0.post2+tuxcare8.4.0.post3+tuxcare8.4.0.post4+tuxcare8.4.0.post5+tuxcare8.4.0.post6+tuxcare8.4.0.post7+tuxcare8.4.0.post8+tuxcare8.4.0.post9+tuxcare
8.4.0.post17+tuxcare
9.4.0.post0 up to 9.4.0.post17+tuxcare, plus listed versions
From an advisory covering 2 CVEs
9.4.09.4.0.post1+tuxcare9.4.0.post10+tuxcare9.4.0.post11+tuxcare9.4.0.post12+tuxcare
Show 12 more versionsShow less
9.4.0.post13+tuxcare9.4.0.post14+tuxcare9.4.0.post15+tuxcare9.4.0.post16+tuxcare9.4.0.post2+tuxcare9.4.0.post3+tuxcare9.4.0.post4+tuxcare9.4.0.post5+tuxcare9.4.0.post6+tuxcare9.4.0.post7+tuxcare9.4.0.post8+tuxcare9.4.0.post9+tuxcare
9.4.0.post17+tuxcare
9.5.0.post0 up to 9.5.0.post18+tuxcare, plus listed versions
From an advisory covering 2 CVEs
9.5.09.5.0.post1+tuxcare9.5.0.post10+tuxcare9.5.0.post11+tuxcare9.5.0.post12+tuxcare
Show 13 more versionsShow less
9.5.0.post13+tuxcare9.5.0.post14+tuxcare9.5.0.post15+tuxcare9.5.0.post16+tuxcare9.5.0.post17+tuxcare9.5.0.post2+tuxcare9.5.0.post3+tuxcare9.5.0.post4+tuxcare9.5.0.post5+tuxcare9.5.0.post6+tuxcare9.5.0.post7+tuxcare9.5.0.post8+tuxcare9.5.0.post9+tuxcare
9.5.0.post18+tuxcare
11.2.1 up to 11.2.1+tuxcare.16, plus listed versions
From an advisory covering 2 CVEs
11.2.1.post1+tuxcare11.2.1.post10+tuxcare11.2.1.post11+tuxcare11.2.1.post12+tuxcare11.2.1.post13+tuxcare
Show 10 more versionsShow less
11.2.1.post14+tuxcare11.2.1.post15+tuxcare11.2.1.post2+tuxcare11.2.1.post3+tuxcare11.2.1.post4+tuxcare11.2.1.post5+tuxcare11.2.1.post6+tuxcare11.2.1.post7+tuxcare11.2.1.post8+tuxcare11.2.1.post9+tuxcare
11.2.1+tuxcare.16
10.4.0 up to 10.4.0+tuxcare.20, plus listed versions
From an advisory covering 2 CVEs
10.4.0+tuxcare.1910.4.0.post1+tuxcare10.4.0.post10+tuxcare10.4.0.post11+tuxcare10.4.0.post12+tuxcare
Show 14 more versionsShow less
10.4.0.post13+tuxcare10.4.0.post14+tuxcare10.4.0.post15+tuxcare10.4.0.post16+tuxcare10.4.0.post17+tuxcare10.4.0.post18+tuxcare10.4.0.post2+tuxcare10.4.0.post3+tuxcare10.4.0.post4+tuxcare10.4.0.post5+tuxcare10.4.0.post6+tuxcare10.4.0.post7+tuxcare10.4.0.post8+tuxcare10.4.0.post9+tuxcare
10.4.0+tuxcare.20
Show 8 more packagesShow less
Packages named only by advisories that cover several CVEs
PackageAffectedFixed
python-pil
TuxCare:Ubuntu:18.04
before 5.1.0-1ubuntu0.8+tuxcare.els8
From an advisory covering 3 CVEs
5.1.0-1ubuntu0.8+tuxcare.els8
python-pil-doc
TuxCare:Ubuntu:18.04
before 5.1.0-1ubuntu0.8+tuxcare.els8
From an advisory covering 3 CVEs
5.1.0-1ubuntu0.8+tuxcare.els8
python-pil.imagetk
TuxCare:Ubuntu:18.04
before 5.1.0-1ubuntu0.8+tuxcare.els8
From an advisory covering 3 CVEs
5.1.0-1ubuntu0.8+tuxcare.els8
python3-pil
TuxCare:Ubuntu:18.04
before 5.1.0-1ubuntu0.8+tuxcare.els8
From an advisory covering 3 CVEs
5.1.0-1ubuntu0.8+tuxcare.els8
python3-pil.imagetk
TuxCare:Ubuntu:18.04
before 5.1.0-1ubuntu0.8+tuxcare.els8
From an advisory covering 3 CVEs
5.1.0-1ubuntu0.8+tuxcare.els8
python-pillow
openEuler:24.03-LTS-SP1
before 10.3.0-17.oe2403sp1
From an advisory covering 2 CVEs
10.3.0-17.oe2403sp1
python-pillow
openEuler:24.03-LTS-SP3
before 10.3.0-16.oe2403sp3
From an advisory covering 2 CVEs
10.3.0-16.oe2403sp3
python-pillow
openEuler:24.03-LTS-SP4
before 10.3.0-17.oe2403sp4
From an advisory covering 2 CVEs
10.3.0-17.oe2403sp4

Products 1

Sources

CVE List Score usedCVSS 4.08.7

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
CVE-2026-128066
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-770
Updated
2026-11-17
EUVDEUVD-2026-124777CVSS 4.08.7

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
EUVD-2026-124777
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-17
GitHub AdvisoriesGHSA-wqgw-9xfh-qf2gNo score

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

============================================================================
ANT-2026-D7STJUWL  [medium]  CWE-770  dos
Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data
Location: src/PIL/TiffImagePlugin.py:927  in ImageFileDirectory_v2.load()
Commit:   a707c6b21c313880d0771e54965d142dd42358b6
============================================================================

A small, crafted image file can make Pillow use thousands of times its own size in memory while the file is only being opened, which lets anyone who can submit an image crash or stall the process handling it. A 144 KB TIFF makes Image.open() return normally while holding 1.6 GiB of memory. The largest such standard TIFF, about 786 KB, asks for roughly 48 GiB, which in practice gets the worker killed by the operating system. The file declares a 1×1 image, so the decompression-bomb check never triggers and no warning is raised. There is no memory corruption; the impact is denial of service.

The bug is in ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py (around line 927). For every directory entry whose value is stored elsewhere in the file, it reads that value into a new bytes object with ImageFile._safe_read(fp, count * unit_size) and keeps it in _tagdata. _safe_read() only checks that the bytes exist. Nothing limits the total read across entries, and nothing stops every entry from pointing at the same bytes. An attacker can therefore give each of N distinct private tags an offset and count that covers the whole file, at a cost of 12 bytes per entry. Memory grows as N × file size, which is quadratic in the file size, and BigTIFF removes the 65,535-entry ceiling.

The same loop parses EXIF data, so the problem reaches beyond TIFF:

  • A 66 KB JPEG APP1 segment costs about 340 MiB inside Image.open() itself, via _read_dpi_from_exif().
  • A 96 KB PNG eXIf chunk costs 754 MiB on getexif() or ImageOps.exif_transpose().
  • WebP EXIF and MPO reach the same code.

The attached reproducer builds a 72 KB TIFF and a 72 KB PNG. Using only Image.open() and getexif(), each causes 412 MiB of tag data to be retained, about 6,000 times the file size. The loop dates to the original PIL 1.1.7 import, so every Pillow release since 1.0 is affected.

Details

TiffImagePlugin.ImageFileDirectory_v2.load() reads the out-of-line value of every IFD entry into its own bytes object and keeps it in self._tagdata. Nothing bounds the sum of those reads, and nothing prevents every entry from pointing at the same region of the file. An IFD with N entries whose (offset, count) each cover the whole file therefore costs N × filesize bytes of memory, while the IFD itself costs only 12 bytes per entry. This one loop is the IFD parser for TIFF frames and for Image.Exif alike, so it is reachable from Image.open() on a TIFF or JPEG and from getexif() / ImageOps.exif_transpose() on PNG, JPEG, WebP and MPO.

Observed on the stock build at this commit: a valid 144,110-byte 1×1 greyscale TIFF with 12,000 such entries makes Image.open() return normally (no exception, no warning, 1 declared pixel so MAX_IMAGE_PIXELS is irrelevant) after 1.5 s, with the process RSS grown from 15 MiB to 1,671 MiB and im.tag_v2 holding 1,649 MiB of tag data for as long as the image object lives. The same IFD placed in the eXIf chunk of a 96 KB PNG makes im.getexif() retain 754 MiB. A 65,870-byte JPEG whose APP1 Exif segment is such an IFD (5,400 entries × 65,519 bytes) allocates ~340 MiB inside Image.open() itself, with no further call.

# src/PIL/TiffImagePlugin.py:902-946  (ImageFileDirectory_v2.load)
for i in range(tag_count):
    tag, typ, count, data = ( … self._unpack("HHL4s", self._ensure_read(fp, 12)))
    …
    size = count * unit_size                         # 918: attacker-chosen
    if size > (8 if self._bigtiff else 4):
        here = fp.tell()
        (offset,) = self._unpack("Q" if self._bigtiff else "L",…
Record
GHSA-wqgw-9xfh-qf2g
Weakness
CWE-770
Updated
2026-11-12
NVDCVSS 4.08.7

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
CVE-2026-128066
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
Weakness
CWE-770
Updated
2026-11-17
OSVCVSS 4.08.7

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
CVE-2026-128066
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-770
Updated
2026-11-27
OSVDHI-smpg-2ko6-sc6x-6ykjCVSS 4.08.7

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py…

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
DHI-smpg-2ko6-sc6x-6ykj
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
Updated
2026-12-05
Show 14 more recordsShow less
OSVOESA-2026-5227CVSS 4.08.7

python-pillow security update

Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging \ Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift. of CVE-2022-22815,CVE-2022-22816)

Security Fix(es):

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.(CVE-2026-128066)

Record
OESA-2026-5227
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
Updated
2026-12-01
OSVOESA-2026-5228CVSS 4.08.7

python-pillow security update

Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging \ Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift. of CVE-2022-22815,CVE-2022-22816)

Security Fix(es):

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.(CVE-2026-128066)

Pillow is a Python imaging library. From 2.3.0 through 12.3.0, Pillow applications that save compressed TIFF images through libtiff can pass attacker-controlled image geometry tags to the encoder while allocating its row buffer from the actual image dimensions. The affected TiffImagePlugin._save path allows ImageWidth, ImageLength, or SamplesPerPixel from exif=, tiffinfo=, or a source TIFF IFD to make libtiff consume a larger scanline than the buffer supplied by ImagingLibTiffEncode. This can read heap memory into the generated TIFF or crash the process. When TIFF Predictor 2 is enabled, libtiff can rewrite the oversized scanline in place and corrupt memory beyond the buffer. A carried-over PlanarConfiguration value of 2 instead makes libtiff use a shorter scanline and can produce an undecodable output file, but is not established to cause the out-of-bounds access. This issue is fixed in version 13.0.0.(CVE-2026-128067)

Record
OESA-2026-5228
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
Updated
2026-12-01
OSVOESA-2026-5229CVSS 4.08.7

python-pillow security update

Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging \ Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift. of CVE-2022-22815,CVE-2022-22816)

Security Fix(es):

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.(CVE-2026-128066)

Pillow is a Python imaging library. From 2.3.0 through 12.3.0, Pillow applications that save compressed TIFF images through libtiff can pass attacker-controlled image geometry tags to the encoder while allocating its row buffer from the actual image dimensions. The affected TiffImagePlugin._save path allows ImageWidth, ImageLength, or SamplesPerPixel from exif=, tiffinfo=, or a source TIFF IFD to make libtiff consume a larger scanline than the buffer supplied by ImagingLibTiffEncode. This can read heap memory into the generated TIFF or crash the process. When TIFF Predictor 2 is enabled, libtiff can rewrite the oversized scanline in place and corrupt memory beyond the buffer. A carried-over PlanarConfiguration value of 2 instead makes libtiff use a shorter scanline and can produce an undecodable output file, but is not established to cause the out-of-bounds access. This issue is fixed in version 13.0.0.(CVE-2026-128067)

Record
OESA-2026-5229
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
Updated
2026-12-01
OSVOESA-2026-5230CVSS 4.08.7

python-pillow security update

Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging \ Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift. of CVE-2022-22815,CVE-2022-22816)

Security Fix(es):

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.(CVE-2026-128066)

Pillow is a Python imaging library. From 2.3.0 through 12.3.0, Pillow applications that save compressed TIFF images through libtiff can pass attacker-controlled image geometry tags to the encoder while allocating its row buffer from the actual image dimensions. The affected TiffImagePlugin._save path allows ImageWidth, ImageLength, or SamplesPerPixel from exif=, tiffinfo=, or a source TIFF IFD to make libtiff consume a larger scanline than the buffer supplied by ImagingLibTiffEncode. This can read heap memory into the generated TIFF or crash the process. When TIFF Predictor 2 is enabled, libtiff can rewrite the oversized scanline in place and corrupt memory beyond the buffer. A carried-over PlanarConfiguration value of 2 instead makes libtiff use a shorter scanline and can produce an undecodable output file, but is not established to cause the out-of-bounds access. This issue is fixed in version 13.0.0.(CVE-2026-128067)

Record
OESA-2026-5230
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
Updated
2026-12-01
OSVUBUNTU-CVE-2026-128066CVSS 4.08.7

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
UBUNTU-CVE-2026-128066
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-19
OSVBIT-pillow-2026-128066No score

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.

Record
BIT-pillow-2026-128066
Updated
2026-11-27
OSVCLSA-2026-1795085896No score

TuxCare security update for pillow (2 CVEs)

TuxCare rebuilt pillow to address 2 CVEs. Fixed in 11.3.0.post14+tuxcare.

Record
CLSA-2026-1795085896
Updated
2026-11-21
OSVCLSA-2026-1795161603No score

TuxCare security update for pillow (2 CVEs)

TuxCare rebuilt pillow to address 2 CVEs. Fixed in 8.4.0.post17+tuxcare.

Record
CLSA-2026-1795161603
Updated
2026-11-23
OSVCLSA-2026-1795163132No score

TuxCare security update for pillow (2 CVEs)

TuxCare rebuilt pillow to address 2 CVEs. Fixed in 9.4.0.post17+tuxcare.

Record
CLSA-2026-1795163132
Updated
2026-11-23
OSVCLSA-2026-1795163256No score

TuxCare security update for pillow (2 CVEs)

TuxCare rebuilt pillow to address 2 CVEs. Fixed in 9.5.0.post18+tuxcare.

Record
CLSA-2026-1795163256
Updated
2026-11-23
OSVCLSA-2026-1795605323No score

TuxCare security update for pillow (2 CVEs)

TuxCare rebuilt pillow to address 2 CVEs. Fixed in 11.2.1+tuxcare.16.

Record
CLSA-2026-1795605323
Updated
2026-11-26
OSVCLSA-2026-1796040423No score

TuxCare security update for pillow (2 CVEs)

TuxCare rebuilt pillow to address 2 CVEs. Fixed in 10.4.0+tuxcare.20.

Record
CLSA-2026-1796040423
Updated
2026-12-01
OSVCLSA-2026-1796042621No score

Fix CVE(s): CVE-2026-112405, CVE-2026-128066, CVE-2026-128067

  • SECURITY UPDATE: Image.merge() of 4-byte-pixel (I/F) single-band images into a multi-band mode read past the band rows (out-of-bounds read)
    • debian/patches/CVE-2026-112405.patch: ImagingMerge counts bands first, rejects 4-byte-pixel bands when merging more than one band, and takes the copy path only for one band.
    • debian/patches/CVE-2026-112405-tests.patch: add regression test.
    • CVE-2026-112405
    • SECURITY UPDATE: Overlapping out-of-line TIFF/EXIF tag offsets, within and across frames, made Pillow read and retain huge amounts of tag data (memory/CPU DoS)
      • debian/patches/CVE-2026-128066.patch: Limit total out-of-line tag data per IFD to the stream size and share one remaining budget across all frames, skipping tags with a warning.
      • debian/patches/CVE-2026-128066-tests.patch: add regression test.
      • CVE-2026-128066
    • SECURITY UPDATE: TIFF save via libtiff with caller-supplied width/samples tags let TIFFWriteScanline read or write past the row buffer (heap overflow)
      • debian/patches/CVE-2026-128067.patch: ImagingLibTiffEncode rejects tag geometry whose TIFFScanlineSize64 exceeds the row buffer with IMAGING_CODEC_CONFIG before encoding.
      • debian/patches/CVE-2026-128067-tests.patch: add regression test.
      • CVE-2026-128067
Record
CLSA-2026-1796042621
Updated
2026-12-03
OSVGHSA-wqgw-9xfh-qf2gNo score

Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data

============================================================================
ANT-2026-D7STJUWL  [medium]  CWE-770  dos
Memory DoS in TIFF and EXIF IFD parsing via overlapping tag data
Location: src/PIL/TiffImagePlugin.py:927  in ImageFileDirectory_v2.load()
Commit:   a707c6b21c313880d0771e54965d142dd42358b6
============================================================================

A small, crafted image file can make Pillow use thousands of times its own size in memory while the file is only being opened, which lets anyone who can submit an image crash or stall the process handling it. A 144 KB TIFF makes Image.open() return normally while holding 1.6 GiB of memory. The largest such standard TIFF, about 786 KB, asks for roughly 48 GiB, which in practice gets the worker killed by the operating system. The file declares a 1×1 image, so the decompression-bomb check never triggers and no warning is raised. There is no memory corruption; the impact is denial of service.

The bug is in ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py (around line 927). For every directory entry whose value is stored elsewhere in the file, it reads that value into a new bytes object with ImageFile._safe_read(fp, count * unit_size) and keeps it in _tagdata. _safe_read() only checks that the bytes exist. Nothing limits the total read across entries, and nothing stops every entry from pointing at the same bytes. An attacker can therefore give each of N distinct private tags an offset and count that covers the whole file, at a cost of 12 bytes per entry. Memory grows as N × file size, which is quadratic in the file size, and BigTIFF removes the 65,535-entry ceiling.

The same loop parses EXIF data, so the problem reaches beyond TIFF:

  • A 66 KB JPEG APP1 segment costs about 340 MiB inside Image.open() itself, via _read_dpi_from_exif().
  • A 96 KB PNG eXIf chunk costs 754 MiB on getexif() or ImageOps.exif_transpose().
  • WebP EXIF and MPO reach the same code.

The attached reproducer builds a 72 KB TIFF and a 72 KB PNG. Using only Image.open() and getexif(), each causes 412 MiB of tag data to be retained, about 6,000 times the file size. The loop dates to the original PIL 1.1.7 import, so every Pillow release since 1.0 is affected.

Details

TiffImagePlugin.ImageFileDirectory_v2.load() reads the out-of-line value of every IFD entry into its own bytes object and keeps it in self._tagdata. Nothing bounds the sum of those reads, and nothing prevents every entry from pointing at the same region of the file. An IFD with N entries whose (offset, count) each cover the whole file therefore costs N × filesize bytes of memory, while the IFD itself costs only 12 bytes per entry. This one loop is the IFD parser for TIFF frames and for Image.Exif alike, so it is reachable from Image.open() on a TIFF or JPEG and from getexif() / ImageOps.exif_transpose() on PNG, JPEG, WebP and MPO.

Observed on the stock build at this commit: a valid 144,110-byte 1×1 greyscale TIFF with 12,000 such entries makes Image.open() return normally (no exception, no warning, 1 declared pixel so MAX_IMAGE_PIXELS is irrelevant) after 1.5 s, with the process RSS grown from 15 MiB to 1,671 MiB and im.tag_v2 holding 1,649 MiB of tag data for as long as the image object lives. The same IFD placed in the eXIf chunk of a 96 KB PNG makes im.getexif() retain 754 MiB. A 65,870-byte JPEG whose APP1 Exif segment is such an IFD (5,400 entries × 65,519 bytes) allocates ~340 MiB inside Image.open() itself, with no further call.

# src/PIL/TiffImagePlugin.py:902-946  (ImageFileDirectory_v2.load)
for i in range(tag_count):
    tag, typ, count, data = ( … self._unpack("HHL4s", self._ensure_read(fp, 12)))
    …
    size = count * unit_size                         # 918: attacker-chosen
    if size > (8 if self._bigtiff else 4):
        here = fp.tell()
        (offset,) = self._unpack("Q" if self._bigtiff else "L",…
Record
GHSA-wqgw-9xfh-qf2g
Weakness
CWE-770
Updated
2026-11-27

The JSON record also has the rest of 2 source descriptions.

History

Recorded by Every CVE

Changes recorded by Every CVE
DayChangedSources
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packages, other IDsOSV
Affected packages, other IDs, referencesOSV
Affected packagesOSV
Affected packages, other IDs, referencesOSV
Affected packages, other IDs, referencesOSV
Affected packagesOSV
Affected packagesOSV
Affected packages, other IDsOSV
Affected packagesOSV
Affected packagesOSV
Show 8 more daysShow less
Changes recorded by Every CVE
DayChangedSources
Affected packages, severityOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packages, other IDsOSV
Affected packagesOSV
Affected packages, other IDsOSV
Affected packagesOSV
Affected packagesOSV
Affected packagesOSV
Affected packages, other IDs, referencesOSV
Published dateEUVD, NVD
ReferencesCVE List
Affected packagesOSV
Affected packages, other IDs, referencesOSV
ReferencesNVD, OSV
Other IDsEUVD
Affected packages, referencesOSV
Description, products, published date, references, severityCVE List
First indexedGitHub Advisories

Upstream dates may differ.

References

Show 11 more referencesShow less
MoveEnter Open