<?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/"><channel><title>Psd — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/psd/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 04 May 2026 20:20:31 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/psd/feed.xml" rel="self" type="application/rss+xml"/><item><title>Pillow Out-of-Bounds Write Vulnerability in PSD Processing (CVE-2026-42311)</title><link>https://feed.craftedsignal.io/briefs/2024-01-pillow-oob-write/</link><pubDate>Mon, 04 May 2026 20:20:31 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-pillow-oob-write/</guid><description>Pillow versions 10.3.0 through 12.1.1 are vulnerable to an out-of-bounds write in PSD image decoding/encoding due to an integer overflow when computing tile extent sums, potentially leading to arbitrary code execution.</description><content:encoded><![CDATA[<p>Pillow, a popular Python image processing library, is vulnerable to an out-of-bounds write vulnerability (CVE-2026-42311) when processing PSD files. Specifically, versions 10.3.0 up to 12.1.1 contain a flaw in how they handle tile extents in PSD image decoding and encoding. The vulnerability arises from an integer overflow when calculating tile extent sums, which bypasses intended bounds checks. This allows a specially crafted PSD image with malicious tile dimensions to trigger an out-of-bounds write in <code>src/decode.c</code> and <code>src/encode.c</code>. Successful exploitation could lead to memory corruption, resulting in a crash or, more critically, arbitrary code execution. The issue was initially addressed in version 12.1.1 (CVE-2026-25990) but the fix was incomplete due to the integer overflow issue. The vulnerability is resolved in Pillow version 12.2.0 by avoiding the addition of extents before comparison.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious PSD image file with specific tile dimensions designed to trigger an integer overflow.</li>
<li>The victim&rsquo;s application, using a vulnerable version of Pillow (10.3.0 - 12.1.1), attempts to process the malicious PSD file.</li>
<li>During PSD image decoding/encoding, Pillow calculates the tile extent sums.</li>
<li>Due to the crafted tile dimensions, the integer overflow occurs, causing the calculated extent sums to wrap around.</li>
<li>The wrapped-around extent sums bypass the bounds checks implemented in Pillow.</li>
<li>An out-of-bounds write operation occurs in <code>src/decode.c</code> or <code>src/encode.c</code>, corrupting memory.</li>
<li>The memory corruption leads to either a crash of the application or, in a more severe scenario, allows the attacker to inject and execute arbitrary code.</li>
<li>The attacker gains control of the affected system, potentially leading to further malicious activities like data exfiltration or lateral movement.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to denial of service (application crash) or, more critically, arbitrary code execution. If an attacker can execute code on a system, they could potentially gain complete control of the system. This could lead to data theft, system compromise, and further propagation of attacks. The vulnerability affects any application that uses the Pillow library to process PSD files, potentially impacting a wide range of software across various sectors.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Pillow to version 12.2.0 or later to remediate CVE-2026-42311, which corrects the integer overflow issue and prevents the out-of-bounds write.</li>
<li>Monitor process creations for the execution of Python scripts (<code>python.exe</code>, <code>python3</code>) that process untrusted PSD files. Deploy the Sigma rule <code>Detect Pillow PSD Processing</code> to identify potentially malicious PSD processing activity.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>pillow</category><category>oob-write</category><category>integer-overflow</category><category>psd</category><category>memory-corruption</category></item></channel></rss>