<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Cpe:2.3:a:python:pillow:12.3.0:*:*:*:*:*:*:* - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/cpes/cpe2.3apythonpillow12.3.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 20 Oct 2026 23:53:33 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/cpes/cpe2.3apythonpillow12.3.0/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Pillow: TIFF encoder ColorMap plane-size mismatch heap out-of-bounds read</title><link>https://feed.craftedsignal.io/briefs/2026-10-pillow-tiff-oob-read/</link><pubDate>Tue, 20 Oct 2026 23:53:33 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-10-pillow-tiff-oob-read/</guid><description>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.</description><content:encoded><![CDATA[<p>Pillow 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 <code>BitsPerSample = 16</code>, 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.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a malicious TIFF file with <code>BitsPerSample = 16</code> and a specifically formatted ColorMap containing 768 SHORT entries.</li>
<li>The malicious TIFF file is delivered to a target application that uses the Pillow library to process or convert images.</li>
<li>The target application invokes <code>Image.open()</code> to load the malicious file, successfully parsing the TIFF metadata.</li>
<li>The target application performs image processing or transformation operations.</li>
<li>The target application invokes the <code>Image.save()</code> function with the <code>format=&quot;TIFF&quot;</code> parameter.</li>
<li>Pillow's <code>ImagingLibTiffSetField</code> function allocates a buffer for the ColorMap metadata based on the initial input size.</li>
<li>The libtiff encoder triggers a <code>memcpy</code> operation, attempting to copy data based on the <code>BitsPerSample</code> value rather than the allocated buffer size.</li>
<li>The process attempts to read memory outside the allocated heap region, resulting in an out-of-bounds read and immediate process termination.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful 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.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor applications using Pillow for unexpected process crashes, specifically those associated with TIFF image processing tasks.</li>
<li>Implement strict validation of TIFF metadata, specifically <code>BitsPerSample</code> and <code>ColorMap</code> tags, before invoking <code>Image.save()</code> on untrusted input.</li>
<li>Perform static analysis of source code to identify instances where user-supplied TIFF metadata is blindly passed to the Pillow save path.</li>
<li>Ensure that the Pillow library is updated to the latest available version if a patch is released to address the buffer allocation logic.</li>
<li>Audit logging for <code>AddressSanitizer</code> error reports in test or development environments to proactively identify similar boundary violation defects.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>image-processing</category><category>library-vulnerability</category><category>denial-of-service</category></item></channel></rss>