Every CVESearch/Get API key

CVE-2026-128067

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

Explain with AI
ChatGPTClaudeGoogle AI
Severity
8.4High
Network attack, no privileges, no user interactionCVSS 4.0, CVE List
Exploitation
Unknown
No source reports exploitation yet.
Exploit chance
0.48% in 30 days
Percentile42nd
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 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.

CVSS 4.0 vector

Exploitability

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

Impact on the vulnerable system

Confidentiality
High
Integrity
Low
Availability
High

Impact on subsequent systems

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

Exploit chance over time

Up less than 0.1 points since Nov 13, 2026
EPSS score, scored every day from Nov 13, 2026 to Dec 4, 2026: lowest 0.45% on Nov 13, 2026, highest 0.52% on Nov 25, 2026, 0.48% 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
2.3.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
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
python-Pillow
openSUSE:Tumbleweed
before 13.0.0-3.1
13.0.0-3.1

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.4

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

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.

Record
CVE-2026-128067
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-787
Updated
2026-11-12
EUVDEUVD-2026-124778CVSS 4.08.4

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.

Record
EUVD-2026-124778
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
Updated
2026-11-13
GitHub AdvisoriesGHSA-xcvg-w56q-r89mCVSS 4.08.4

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

============================================================================
ANT-2026-CS7N494P  [high]  CWE-787  memory-safety
Heap buffer overflow saving TIFF with libtiff when tags override image size
Location: src/libImaging/TiffDecode.c:1035  in ImagingLibTiffEncode()
Commit:   a707c6b21c313880d0771e54965d142dd42358b6
============================================================================

When Pillow saves an image as a compressed TIFF, size information taken from the image's metadata can make the encoder read past the end of a heap buffer. Someone who uploads an image can use this to get the server process's memory, including pointers, copied into the saved file, or to crash the process. When the metadata also enables TIFF "Predictor=2" compression, the encoder writes past the buffer instead, corrupting the heap and aborting the process. This affects applications that write TIFF through libtiff (any compression= other than raw) and either carry the source metadata across with exif=im.getexif() / tiffinfo=, or simply re-save a crafted palette TIFF with Image.open(f).save(out, "TIFF"), which inherits its compression and predictor from the upload.

In TiffImagePlugin._save's libtiff branch, only BitsPerSample is pinned to the real image when the tag list for the encoder is built (src/PIL/TiffImagePlugin.py:1955). ImageWidth, ImageLength and PlanarConfiguration are set from im.size but are then overwritten by the exif=/tiffinfo= merge loop at :1768-1772. SamplesPerPixel is never set for single-band modes, so a value from the caller's tags or from the source TIFF's own IFD reaches TIFFSetField. ImagingLibTiffEncode then passes a row buffer sized from the actual image (src/encode.c:291) to TIFFWriteScanline (src/libImaging/TiffDecode.c:1035) with no check against TIFFScanlineSize(), and libtiff consumes a full scanline of the tag-described width from it.

The attached reproducer demonstrates the read case. A 64x4 greyscale JPEG whose EXIF says SamplesPerPixel=3, Photometric=RGB is converted into a valid RGB TIFF in which 128 bytes of each row are live heap, including pointers that change from run to run. The same JPEG with EXIF ImageWidth=2**27 kills the process with SIGSEGV. For the write case, the values written are byte-wise differences of existing heap contents rather than attacker-chosen data, and nothing beyond the observed glibc abort is shown. The tiffinfo= route dates back to Pillow 2.3.0 (dbf47837ce99), and the exif= route to 8.4.0 (c0f619384cbc).

Details

When an image is saved as TIFF through the libtiff encoder (any compression= other than raw, or TiffImagePlugin.WRITE_LIBTIFF), libtiff sizes its scanline from the ImageWidth / SamplesPerPixel / BitsPerSample / PlanarConfiguration tags it was handed, Pillow sizes the encoder row buffer from the real image, and nothing compares the two. In TiffImagePlugin._save's libtiff branch only BitsPerSample is pinned in the attribute dict given to the encoder (atts, src/PIL/TiffImagePlugin.py:1955-1982); the other geometry tags can come from caller- or attacker-supplied data:

  • ImageWidth (256), ImageLength (257) and PlanarConfiguration (284) are set from im.size before the tiffinfo= / exif= merge loop at :1768-1772, so they are overwritten by it — by the EXIF of an uploaded JPEG, or by stale geometry in im.getexif() / im.tag_v2 of a TIFF that Pillow auto-transposed on load (Orientation tag) or that the application thumbnail()ed.
  • SamplesPerPixel (277) is only put in the IFD for multi-band modes (:1847-1850), so for single-band images (L, P, I;16, 1, …) a value from exif= / tiffinfo=, or from the source TIFF's own IFD via supplied_tags (im.tag_v2, :1782), is forwarded to libtiff. A palette TIFF with SamplesPerPixel=2, BitsPerSample=(8,8), ExtraSamples=(0,) opens as mode P (rawmode PX, extra sample dropped), and a bare…
Record
GHSA-xcvg-w56q-r89m
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-787
Updated
2026-11-12
NVDCVSS 4.08.4

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.

Record
CVE-2026-128067
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/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-787
Updated
2026-11-13
OSVCVSS 4.08.4

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

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.

Record
CVE-2026-128067
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-787
Updated
2026-11-27
OSVDHI-ahzi-qa4l-4lyk-biy7CVSS 4.08.4

Pillow is a Python imaging library. From 2.3.0 through 12.3.0, Pillow applications that save compressed TIFF images…

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.

Record
DHI-ahzi-qa4l-4lyk-biy7
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/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
OSVGHSA-xcvg-w56q-r89mCVSS 4.08.4

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

============================================================================
ANT-2026-CS7N494P  [high]  CWE-787  memory-safety
Heap buffer overflow saving TIFF with libtiff when tags override image size
Location: src/libImaging/TiffDecode.c:1035  in ImagingLibTiffEncode()
Commit:   a707c6b21c313880d0771e54965d142dd42358b6
============================================================================

When Pillow saves an image as a compressed TIFF, size information taken from the image's metadata can make the encoder read past the end of a heap buffer. Someone who uploads an image can use this to get the server process's memory, including pointers, copied into the saved file, or to crash the process. When the metadata also enables TIFF "Predictor=2" compression, the encoder writes past the buffer instead, corrupting the heap and aborting the process. This affects applications that write TIFF through libtiff (any compression= other than raw) and either carry the source metadata across with exif=im.getexif() / tiffinfo=, or simply re-save a crafted palette TIFF with Image.open(f).save(out, "TIFF"), which inherits its compression and predictor from the upload.

In TiffImagePlugin._save's libtiff branch, only BitsPerSample is pinned to the real image when the tag list for the encoder is built (src/PIL/TiffImagePlugin.py:1955). ImageWidth, ImageLength and PlanarConfiguration are set from im.size but are then overwritten by the exif=/tiffinfo= merge loop at :1768-1772. SamplesPerPixel is never set for single-band modes, so a value from the caller's tags or from the source TIFF's own IFD reaches TIFFSetField. ImagingLibTiffEncode then passes a row buffer sized from the actual image (src/encode.c:291) to TIFFWriteScanline (src/libImaging/TiffDecode.c:1035) with no check against TIFFScanlineSize(), and libtiff consumes a full scanline of the tag-described width from it.

The attached reproducer demonstrates the read case. A 64x4 greyscale JPEG whose EXIF says SamplesPerPixel=3, Photometric=RGB is converted into a valid RGB TIFF in which 128 bytes of each row are live heap, including pointers that change from run to run. The same JPEG with EXIF ImageWidth=2**27 kills the process with SIGSEGV. For the write case, the values written are byte-wise differences of existing heap contents rather than attacker-chosen data, and nothing beyond the observed glibc abort is shown. The tiffinfo= route dates back to Pillow 2.3.0 (dbf47837ce99), and the exif= route to 8.4.0 (c0f619384cbc).

Details

When an image is saved as TIFF through the libtiff encoder (any compression= other than raw, or TiffImagePlugin.WRITE_LIBTIFF), libtiff sizes its scanline from the ImageWidth / SamplesPerPixel / BitsPerSample / PlanarConfiguration tags it was handed, Pillow sizes the encoder row buffer from the real image, and nothing compares the two. In TiffImagePlugin._save's libtiff branch only BitsPerSample is pinned in the attribute dict given to the encoder (atts, src/PIL/TiffImagePlugin.py:1955-1982); the other geometry tags can come from caller- or attacker-supplied data:

  • ImageWidth (256), ImageLength (257) and PlanarConfiguration (284) are set from im.size before the tiffinfo= / exif= merge loop at :1768-1772, so they are overwritten by it — by the EXIF of an uploaded JPEG, or by stale geometry in im.getexif() / im.tag_v2 of a TIFF that Pillow auto-transposed on load (Orientation tag) or that the application thumbnail()ed.
  • SamplesPerPixel (277) is only put in the IFD for multi-band modes (:1847-1850), so for single-band images (L, P, I;16, 1, …) a value from exif= / tiffinfo=, or from the source TIFF's own IFD via supplied_tags (im.tag_v2, :1782), is forwarded to libtiff. A palette TIFF with SamplesPerPixel=2, BitsPerSample=(8,8), ExtraSamples=(0,) opens as mode P (rawmode PX, extra sample dropped), and a bare…
Record
GHSA-xcvg-w56q-r89m
CVSS 4.0
8.4 HighCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
Weakness
CWE-787
Updated
2026-11-27
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-128067CVSS 4.08.4

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.

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

Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image size

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.

Record
BIT-pillow-2026-128067
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
OSVopenSUSE-SU-2026:12672-1No score

python313-Pillow-13.0.0-3.1 on GA media

These are all security issues fixed in the python313-Pillow-13.0.0-3.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:12672-1
Updated
2026-11-25

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 packages, other IDs, referencesOSV
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
Affected packagesOSV
Affected packages, other IDs, referencesOSV
Published dateEUVD
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