
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-112902 is a memory disclosure and denial-of-service vulnerability in Pillow's libtiff TIFF encoder, titled "Memory disclosure and segfault in libtiff encoder via crafted TIFF tags." It affects Pillow versions 5.4.0 through 12.3.0 (inclusive) and was published on October 17, 2026, with a fix released in version 13.0.0. The root cause is that PyImaging_LibTiffEncoderNew in src/encode.c passes mismatched arguments to the variadic TIFFSetField() function when processing attacker-controlled TIFF tag metadata. It carries a CVSS v3.1 base score of 9.1 (Critical) and a CVSS v4.0 base score of 8.3 (High) (Github Advisory, Pillow Security Advisory).
The vulnerability is classified as CWE-686 (Function Call With Incorrect Argument Type). PyImaging_LibTiffEncoderNew determines the argument shape passed to the variadic TIFFSetField() based solely on the Python value type (scalar, tuple, or bytes), incorrectly assuming that its own ImagingLibTiffMergeFieldInfo() registration overrides libtiff's built-in field definitions. In reality, TIFFMergeFieldInfo() never overrides libtiff's built-in table for known tags, so libtiff reads varargs according to its own field definition regardless of what Pillow pushed. For counted-array tags like DNGPrivateData (50740), an attacker-supplied integer is consumed by libtiff as a byte count, and the data pointer is read from an unwritten vararg slot — causing libtiff to memcpy an attacker-chosen number of bytes from process memory into the output TIFF. For fixed-size array tags like ActiveArea (50829), the integer is used directly as a source address, causing a SIGSEGV. The vulnerability is reachable via a plain Image.open() followed by im.save(fp, "TIFF") whenever the source image is compressed, and also through JPEG/PNG/WebP images with EXIF metadata converted to compressed TIFF output (Pillow Security Advisory, Fix PR #10227).
Successful exploitation allows an unauthenticated attacker to cause two distinct impacts: (1) memory disclosure — an attacker-chosen number of bytes from the worker process's memory (including pointers into _imaging.so, libpython, libc, libtiff, and libjpeg) are embedded in the re-saved TIFF output and returned to the attacker, enabling a complete ASLR bypass that can be chained with other memory-corruption bugs; and (2) denial of service — certain crafted tag values (e.g., ActiveArea with value 64) cause a deterministic SIGSEGV crash of the worker process on every request. In testing, requests for up to 2,000,000 bytes of process memory succeeded, returning over 2,800 resolved pointers. The vulnerability affects any service that accepts image uploads and re-saves them as TIFF, including pipelines that process JPEG/PNG/WebP with EXIF metadata into compressed TIFF output (Pillow Security Advisory).
The advisory includes concrete reproduction steps — a crafted sub-1 KB TIFF with specific IFD tag entries (e.g., tag 50740/LONG/count 1/value 4096) followed by Image.open() and im.save(buf, "TIFF") — which reliably trigger memory disclosure and SIGSEGV. Feedly's analysis classifies this as a high-confidence PoC with exploitation steps described in the advisory, though no standalone runnable exploit code has been publicly released. There is no evidence of in-the-wild exploitation as of the advisory date. The EPSS score is approximately 0.495%, and the vulnerability is not listed in the CISA KEV catalog. No threat actor attribution has been reported. The vulnerability requires no authentication and no user interaction, but does require the target application to re-save images as TIFF (Github Advisory, Feedly).
50740 (DNGPrivateData) / LONG / count 1 / value 65536. For a crash, use tag 50829 (ActiveArea) / LONG / count 1 / value 64.Image.open(uploaded_file) followed by im.save(output, "TIFF"). Because the source is LZW-compressed, Pillow automatically routes the save through the libtiff writer without any explicit option from the application.TIFFSetField(). libtiff, using its built-in definition for DNGPrivateData (passcount=1), reads this as the byte count and reads the data pointer from an unwritten vararg slot (a stale CPU register pointing into _imaging.so's .rodata). libtiff then memcpys 65536 bytes of process memory into the output TIFF tag.libpython, libc, libtiff, and libjpeg, enabling a full ASLR bypass for chaining with additional exploits (Pillow Security Advisory).RuntimeError messages such as "Failed to allocate memory for custom tag binary object (-N elements of 4 bytes each)" in application logs..rodata or .data sections of _imaging.so or other shared libraries loaded by the Python process (Pillow Security Advisory).The primary remediation is to upgrade Pillow to version 13.0.0 or later, which validates TIFF tag values against libtiff's own field definition before calling TIFFSetField(), raising ValueError for mismatched values instead of forwarding them (Pillow 13.0.0 Release, Fix Commit). If immediate patching is not possible, implement input validation and sanitization for image metadata before processing through the TIFF encoder, and restrict re-saving of compressed TIFF images or EXIF-preserving conversions to trusted sources only. IBM Netezza Software users should consult the IBM advisory for platform-specific guidance (IBM Advisory). Linux distribution users (SUSE, openSUSE, Red Hat, Amazon Linux) should apply the updated python-Pillow packages provided by their respective vendors.
The vulnerability was reported by researcher "carlini" and credited in the fix commit, with the fix co-authored with assistance from Copilot and Claude Opus 5.5 (Fix PR #10227). GitLab published a blog post highlighting the CVE and demonstrating how to find and fix it using GitLab tooling. Multiple Linux distributions (SUSE, openSUSE, Red Hat, Amazon Linux) issued security advisories and updated packages. The vulnerability received coverage on security aggregators including VulDB, OSV.dev, AusCERT, and Radar/Offseq, and was discussed in the oss-security mailing list. Community reaction focused on the severity of the ASLR-bypass potential and the breadth of affected code paths across multiple TIFF tag types.
Fix availability across major Linux distributions and their releases.
bionic (esm-infra)
pillow
devel
pillow
focal (esm-apps)
pillow-python2
focal (esm-infra)
pillow
jammy
pillow
noble
pillow
resolute
pillow
trusty (esm-infra-legacy)
pillow
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."