<?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>Pillow (&lt; 13.0.0) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/pillow--13.0.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>Fri, 23 Oct 2026 10:36:51 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/pillow--13.0.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: Remote Code Execution and Memory Vulnerabilities</title><link>https://feed.craftedsignal.io/briefs/2026-10-pillow-vulnerabilities/</link><pubDate>Fri, 23 Oct 2026 10:36:51 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-10-pillow-vulnerabilities/</guid><description>Pillow, a Python image library, contains vulnerabilities that allow for remote code execution or process crashes through the processing of crafted image files or filenames.</description><content:encoded>&lt;p>Pillow contains security vulnerabilities that can be triggered by processing crafted image files or specific filenames. One flaw, CVE-2026-112900, involves the library passing an attacker-controlled filename to Ghostscript when opening EPS images, which can lead to operating system command execution. Other vulnerabilities include memory buffer overflows in JPEG and TIFF processing. Pillow maintainers released version 13.0.0 to address these issues.&lt;/p>
</content:encoded><category domain="severity">critical</category><category domain="type">advisory</category></item><item><title>Pillow: Heap buffer overflow in ImagingJpegDecode</title><link>https://feed.craftedsignal.io/briefs/2026-10-pillow-heap-overflow/</link><pubDate>Tue, 20 Oct 2026 23:53:08 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-10-pillow-heap-overflow/</guid><description>A heap-based buffer overflow in Pillow’s ImagingJpegDecode function occurs when processing lossless (SOF3) JPEG files, leading to out-of-bounds memory writes during scanline decompression.</description><content:encoded><![CDATA[<p>Pillow contains a heap-based buffer overflow vulnerability within the <code>ImagingJpegDecode</code> function. The issue arises when the library processes lossless (SOF3) JPEG images while performing downscaling, such as when calling <code>Image.thumbnail()</code> or <code>JpegImageFile.draft()</code>. When these methods request a scaled output, Pillow shrinks the internal decode buffer to match the expected scaled dimensions. However, the underlying libjpeg-turbo implementation ignores the scaling request for lossless (SOF3) streams and writes full-width scanlines into the undersized buffer.</p>
<p>An attacker can exploit this by providing a maliciously crafted, standards-compliant 8-bit grayscale lossless JPEG. The buffer overflow occurs because there is no geometry validation comparing the libjpeg output dimensions against the allocated <code>state-&gt;buffer</code>. Depending on the image dimensions and requested scaling factors, this can result in writing attacker-controlled pixel data past the end of the heap-allocated buffer. While the library ultimately throws an <code>OSError</code> due to geometry mismatches, the memory corruption occurs during the decompression process.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a standards-compliant 8-bit grayscale lossless (SOF3) JPEG image file.</li>
<li>Attacker hosts or delivers the file to a target system utilizing a vulnerable version of Pillow.</li>
<li>The victim application calls <code>Image.open()</code> on the malicious file, which is parsed successfully by Pillow's SOF parser.</li>
<li>The application calls <code>Image.thumbnail()</code> or <code>JpegImageFile.draft()</code> on the image object, triggering a scaling request (e.g., scale factor s &gt;= 2).</li>
<li>Pillow computes expected scaled dimensions and allocates a <code>state-&gt;buffer</code> using <code>calloc</code> based on the reduced size.</li>
<li>The <code>ImagingJpegDecode</code> function calls <code>jpeg_start_decompress</code> and proceeds to <code>jpeg_read_scanlines</code> without validating the actual JPEG output dimensions.</li>
<li>libjpeg-turbo writes the full-width pixel scanlines into the undersized buffer, causing an out-of-bounds heap write of <code>(W - ceil(W/s)) x components</code> bytes.</li>
<li>The overflow corrupts heap memory with attacker-controlled pixel values.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for memory corruption on systems using Pillow to process user-supplied images. This can lead to application crashes or potentially arbitrary code execution depending on the heap layout and the ability to influence memory state through crafted pixel data. This vulnerability affects any system or service that automatically generates thumbnails or processes image uploads using Pillow with standard library defaults.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Identify and inventory all applications within the environment that utilize the Pillow library for image processing.</li>
<li>Implement strict input validation or sanitization for JPEG files to detect or reject lossless (SOF3) images if the functionality is not explicitly required.</li>
<li>Monitor internal application logs for <code>OSError</code> exceptions originating from <code>PIL.JpegImagePlugin</code> or <code>libImaging</code> during image processing, as these may indicate attempted exploitation.</li>
<li>Apply patches provided by the Pillow project as soon as they become available for the affected versions.</li>
</ol>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>image-processing</category><category>memory-corruption</category><category>heap-overflow</category></item></channel></rss>