Security fix · CVE-2026-112897
Pillow is a Python imaging library.
Published Oct 19, 2026 · catalog updated Oct 26, 2026 · Pillow is a Python
Last checked Oct 31, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-112897. EPSS is 0.48%. Act only if a listed version of Pillow is a Python is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- High8.7
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.48%
- Remediation
- Version ranges on file
- Affected products
- PyPI pillow · pip Pillow
Pillow hands back leftover process memory as image pixels when it opens a small crafted TIFF file. Anyone who can get an application to open their image, and can see something produced from its pixels (a thumbnail, a preview, a converted copy), can read heap memory that the process had previously used and freed. This works in the default configuration: opening and loading the 478-byte file succeeds with no error or warning, and every row below the first eight holds stale memory instead of picture content. The bug is in in , and has the same shape. The function s to bytes without initialising it and calls . Whenever that call does not return -1, it copies all rows of the buffer into the image. libtiff's JPEG codec only warns when the JPEG embedded in a strip has fewer rows than the strip, and Pillow silences libtiff warnings. The codec decodes the rows that exist and still returns the full strip size, so the untouched remainder is copied out as pixels. libtiff's Group 4 fax codec behaves the same way for a stream that ends early. The attached reproducer builds a 256×256 TIFF whose single strip or tile is a 256×8 JPEG. Before loading it, the script frees buffers filled with . It then finds 15,872 copies of in rows 8–255 of the decoded image (the same freed chunk was reused in 500 of 500 runs). Under glibc's , those rows are entirely the allocator's fill byte. A well-formed control file decodes correctly in both cases. This is a read of uninitialised heap memory, not memory corruption. Each strip can disclose up to width × bytes, and what comes back depends on the allocator's state at the time. The strip path was introduced in e91b851fdc1c ("Add reading old-JPEG compressed TIFFs", first released in Pillow 6.0.0). The tile path has had the same pattern since f0436a4ddc95 (Pillow 5.3.0). ## Details decodes compressed TIFFs through libtiff into a strip (or tile) buffer that it s to bytes and never initialises, and then copies all rows of that buffer into the image wheneve
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- PyPI pillow5.3.0 → 13.0.0
- pip Pillow>= 5.3.0, < 13.0.0
How to fix CVE-2026-112897
Upgrade
CVE-2026-112897 lists a fix boundary at 13.0.0. Compare the installed build with that boundary before you change production.
Version check
Affected < 13.0.0
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-112897. EPSS is 0.48%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with Pillow >= 5.3.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-908: Use of Uninitialized Resource. EPSS 0.48%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 19, 2026 · NIST NVD
Detected
Pillow is a Python imaging library. From 5.3.0 until 13.0.0, Pillow can return uninitialized memory as pixels when libtiff performs a short decode of JPEG-compressed or Group 4 fax TIFF data. The _decodeStrip and _decodeTile buffers can be larger than the bytes written by libtiff, but Pillow converts the expected rows without clearing the unwritten tail. The tile path is affected from 5.3.0 and th
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. From 5.3.0 until 13.0.0, Pillow can return uninitialized memory as pixels when libtiff performs a short decode of JPEG-compressed or Group 4 fax TIFF data. The _decodeStrip and _decodeTile buffers can be larger than the bytes written by libtiff, but Pillow converts the expected rows without clearing the unwritten tail. The tile path is affected from 5.3.0 and th
Oct 20, 2026 · GitHub Advisory Database
Updated
Pillow hands back leftover process memory as image pixels when it opens a small crafted TIFF file. Anyone who can get an application to open their image, and can see something produced from its pixels (a thumbnail, a preview, a converted copy), can read heap memory that the process had previously used and freed. This works in the default configuration: opening and loading the 478-byte file succeed
Oct 26, 2026 · PyPA Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · PyPA Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 26, 2026 · PyPA Advisory Database
Updated
Pillow hands back leftover process memory as image pixels when it opens a small crafted TIFF file. Anyone who can get an application to open their image, and can see something produced from its pixels (a thumbnail, a preview, a converted copy), can read heap memory that the process had previously used and freed. This works in the default configuration: opening and loading the 478-byte file succeed
Sources
- CVE.orgVulnerability recordCVE-2026-112897
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-112897
30-day exploitation probability 0.48%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-q45j-58j2-45rg
Pillow: TiffDecode returns uninitialized memory as pixels for short JPEG strips
github.com - NIST NVDVulnerability recordCVE-2026-112897
Pillow is a Python imaging library. From 5.3.0 until 13.0.0, Pillow can return uninitialized memory as pixels when libtiff performs a short decode of JPEG-compressed or Group 4 fax TIFF data. The _decodeStrip and _decodeTile buffers can be larger than the bytes written by libtiff
nvd.nist.gov - PyPA Advisory DatabasePackage advisoryGHSA-q45j-58j2-45rg
Pillow: TiffDecode returns uninitialized memory as pixels for short JPEG strips
osv.dev
References
Freshness
Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSOct 31, 2026
- PyPA Advisory DatabaseOct 26, 2026
- GitHub Advisory DatabaseOct 21, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 21, 2026