Security fix · CVE-2026-112396
Pillow is a Python imaging library.
Published Oct 19, 2026 · catalog updated Oct 27, 2026 · Pillow is a Python
Last checked Oct 30, 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-112396. EPSS is 0.69%. 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
- Medium5.9
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.69%
- Remediation
- Version ranges on file
- Affected products
- Bitnami pillow · PyPI pillow · pip pillow · pypi pillow
### Summary Saving an image as TIFF to an in-memory buffer can trigger a heap use-after-free if libtiff rejects a tag at encode time. When fails, the encoder frees its output buffer but leaves the libtiff handle open. Later, when the encoder object is torn down, flushes buffered bytes through the write callback and writes into the freed buffer. An application that re-encodes attacker-influenced images to TIFF in memory can be crashed and is a candidate for remote code execution. ### Details The failure path in frees for the in-memory case but does not close the TIFF or null (the file-descriptor branch just above it does set ): - Teardown then calls , which runs because is still set: - - flushes through , which reallocs and memcpys into the freed : - The Predictor tag is a convenient trigger: the floating-point predictor (value 3) is invalid for integer sample data, so libtiff aborts the write. ### PoC Run it: Observed on a source build of commit with libtiff. The process aborts during cleanup after the encoder error. Depending on heap state the same run sometimes reports instead of a segfault; both are the same write into freed memory. Under AddressSanitizer (build with ), relevant frames: The buffer allocated in is freed in , then written by during the flush that runs from the encoder's . ### Impact Use-after-free in a C extension. Affects any service that converts or thumbnails untrusted images to TIFF in memory (a or other non-seekable target). Result is a crash and possible memory corruption leading to code execution.
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.
- Bitnami pillow11.3.0 → 13.0.0
- PyPI pillow11.3.0 → 13.0.0
- pip pillow>= 11.3.0, < 13.0.0
- pypi pillowversion unspecified
How to fix CVE-2026-112396
Upgrade
CVE-2026-112396 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-112396. EPSS is 0.69%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with 11.3.0 → 13.0.0, >= 11.3.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-416: Use After Free. EPSS 0.69%. 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 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and la
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and la
Oct 20, 2026 · NIST NVD
Updated
Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and la
Oct 21, 2026 · GitHub Advisory Database
Updated
### Summary Saving an image as TIFF to an in-memory buffer can trigger a heap use-after-free if libtiff rejects a tag at encode time. When fails, the encoder frees its output buffer but leaves the libtiff handle open. Later, when the encoder object is torn down, flushes buffered bytes through the write callback and writes into the freed buffer. An application that re-encodes attacker-influenced im
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
### Summary Saving an image as TIFF to an in-memory buffer can trigger a heap use-after-free if libtiff rejects a tag at encode time. When fails, the encoder frees its output buffer but leaves the libtiff handle open. Later, when the encoder object is torn down, flushes buffered bytes through the write callback and writes into the freed buffer. An application that re-encodes attacker-influenced im
Oct 27, 2026 · GitHub Advisory Database
Updated
Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding in ImagingLibTiffEncode; the error path then frees the output buffer without closing or clearing the TIFF handle, and la
Sources
- CVE.orgVulnerability recordCVE-2026-112396
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-112396
30-day exploitation probability 0.69%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-4rr5-89j8-mwwm
GitHub Advisory Database record mirrored by OSV.
github.com - GitLab Advisory DatabasePackage advisoryCVE-2026-112396
Saving an image as TIFF to an in-memory buffer can trigger a heap use-after-free if libtiff rejects a tag at encode time. When TIFFWriteScanline fails, the encoder frees its output buffer but leaves the libtiff handle open. Later, when the encoder object is torn down, TIFFClose flushes buffered bytes through the write callback and writes into the freed buffer. An application that re-encodes attack
advisories.gitlab.com - NIST NVDVulnerability recordCVE-2026-112396
Pillow is a Python imaging library. From 11.3.0 until 13.0.0, Pillow has a heap use-after-free when libtiff rejects a tag while encoding TIFF data to an in-memory buffer. When an application saves attacker-influenced TIFF tags to BytesIO, libtiff can reject a tag during encoding
nvd.nist.gov - OpenSSF OSV / OSV ScannerPackage advisoryBIT-pillow-2026-112396
Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
osv.dev - PyPA Advisory DatabasePackage advisoryGHSA-4rr5-89j8-mwwm
Pillow: Heap use-after-free when encoding TIFF to an in-memory buffer
osv.dev
References
Freshness
Last verified in this catalog Oct 30, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- FIRST EPSSOct 30, 2026
- GitHub Advisory DatabaseOct 28, 2026
- OpenSSF OSV / OSV ScannerOct 28, 2026
- PyPA Advisory DatabaseOct 26, 2026
- GitLab Advisory DatabaseOct 23, 2026
- CVE.orgOct 21, 2026
- NIST NVDOct 21, 2026