{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","favicon":"https://feed.craftedsignal.io/favicon-32x32.png","feed_url":"https://feed.craftedsignal.io/cpes/cpe2.3apythonpillow12.3.0/feed.json","home_page_url":"https://feed.craftedsignal.io/","icon":"https://feed.craftedsignal.io/apple-touch-icon.png","items":[{"_cs_actors":[],"_cs_cpes":["cpe:2.3:a:python:pillow:12.3.0:*:*:*:*:*:*:*"],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["Pillow (12.3.0)"],"_cs_severities":["medium"],"_cs_tags":["image-processing","library-vulnerability","denial-of-service"],"_cs_type":"advisory","_cs_vendors":["Python Software Foundation"],"content_html":"\u003cp\u003ePillow version 12.3.0 is vulnerable to a heap-based out-of-bounds read during the TIFF encoding process. The flaw is triggered when an application opens a TIFF file containing a specific ColorMap (tag 320) and subsequently attempts to save the image while retaining existing metadata. Pillow's TIFF encoder allocates a buffer based on a fixed stride of 256 SHORT values; however, if the image metadata specifies \u003ccode\u003eBitsPerSample = 16\u003c/code\u003e, the underlying libtiff library expects a significantly larger data volume per plane. This discrepancy causes libtiff to attempt a 131,072-byte read from a 1,536-byte heap-allocated region. While the defect leads to an ASAN-observed out-of-bounds read and process termination, arbitrary memory disclosure or code execution has not been demonstrated.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAttacker crafts a malicious TIFF file with \u003ccode\u003eBitsPerSample = 16\u003c/code\u003e and a specifically formatted ColorMap containing 768 SHORT entries.\u003c/li\u003e\n\u003cli\u003eThe malicious TIFF file is delivered to a target application that uses the Pillow library to process or convert images.\u003c/li\u003e\n\u003cli\u003eThe target application invokes \u003ccode\u003eImage.open()\u003c/code\u003e to load the malicious file, successfully parsing the TIFF metadata.\u003c/li\u003e\n\u003cli\u003eThe target application performs image processing or transformation operations.\u003c/li\u003e\n\u003cli\u003eThe target application invokes the \u003ccode\u003eImage.save()\u003c/code\u003e function with the \u003ccode\u003eformat=\u0026quot;TIFF\u0026quot;\u003c/code\u003e parameter.\u003c/li\u003e\n\u003cli\u003ePillow's \u003ccode\u003eImagingLibTiffSetField\u003c/code\u003e function allocates a buffer for the ColorMap metadata based on the initial input size.\u003c/li\u003e\n\u003cli\u003eThe libtiff encoder triggers a \u003ccode\u003ememcpy\u003c/code\u003e operation, attempting to copy data based on the \u003ccode\u003eBitsPerSample\u003c/code\u003e value rather than the allocated buffer size.\u003c/li\u003e\n\u003cli\u003eThe process attempts to read memory outside the allocated heap region, resulting in an out-of-bounds read and immediate process termination.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful exploitation results in the abnormal termination of the host application process, leading to potential denial-of-service for the affected service. The vulnerability requires the application to process and re-save user-supplied image files while retaining metadata.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eMonitor applications using Pillow for unexpected process crashes, specifically those associated with TIFF image processing tasks.\u003c/li\u003e\n\u003cli\u003eImplement strict validation of TIFF metadata, specifically \u003ccode\u003eBitsPerSample\u003c/code\u003e and \u003ccode\u003eColorMap\u003c/code\u003e tags, before invoking \u003ccode\u003eImage.save()\u003c/code\u003e on untrusted input.\u003c/li\u003e\n\u003cli\u003ePerform static analysis of source code to identify instances where user-supplied TIFF metadata is blindly passed to the Pillow save path.\u003c/li\u003e\n\u003cli\u003eEnsure that the Pillow library is updated to the latest available version if a patch is released to address the buffer allocation logic.\u003c/li\u003e\n\u003cli\u003eAudit logging for \u003ccode\u003eAddressSanitizer\u003c/code\u003e error reports in test or development environments to proactively identify similar boundary violation defects.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-10-20T23:53:33Z","date_published":"2026-10-20T23:53:33Z","id":"https://feed.craftedsignal.io/briefs/2026-10-pillow-tiff-oob-read/","summary":"A heap-based out-of-bounds read vulnerability in the Pillow TIFF encoder occurs when saving images with crafted metadata, potentially leading to application crashes.","title":"Pillow: TIFF encoder ColorMap plane-size mismatch heap out-of-bounds read","url":"https://feed.craftedsignal.io/briefs/2026-10-pillow-tiff-oob-read/"}],"language":"en","title":"CraftedSignal Threat Feed - Cpe:2.3:a:python:pillow:12.3.0:*:*:*:*:*:*:*","version":"https://jsonfeed.org/version/1.1"}