<?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>Pillow Project - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/pillow-project/</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>Mon, 20 Jul 2026 21:14:58 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/pillow-project/feed.xml" rel="self" type="application/rss+xml"/><item><title>Pillow FontFile.compile() Vulnerability Bypasses Decompression Checks Leading to DoS (CVE-2026-54060)</title><link>https://feed.craftedsignal.io/briefs/2026-07-pillow-fontfile-compile-dos/</link><pubDate>Mon, 20 Jul 2026 21:14:58 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-pillow-fontfile-compile-dos/</guid><description>A vulnerability, CVE-2026-54060, in the Pillow library's `FontFile.compile()` method allows attackers to craft malicious BDF or PCF font files that bypass standard decompression bomb checks, causing an unchecked, massive memory allocation when processed, which can lead to a Denial of Service (DoS) via an Out-Of-Memory (OOM) crash in vulnerable applications.</description><content:encoded><![CDATA[<p>A critical vulnerability, tracked as CVE-2026-54060, has been identified in the Pillow image processing library (versions prior to 12.3.0). Specifically, the <code>FontFile.compile()</code> method, used by both <code>BdfFontFile</code> and <code>PcfFontFile</code> to assemble per-glyph images into a single combined bitmap, fails to invoke the <code>Image._decompression_bomb_check()</code>. This oversight allows an attacker to craft a malicious font file (e.g., BDF or PCF format) where individual glyphs are small enough to evade existing checks, but their combined size results in an uncontrolled, massive memory allocation upon compilation. For instance, a font with 256 glyphs, each claiming a height of 65,535 pixels, can trigger an allocation of approximately 1.6 GB, potentially reaching 13.4 billion pixels. This vulnerability can be triggered in applications that process user-supplied font files, such as web font preview services or server-side font renderers, leading to application crashes and Denial of Service (DoS) due to Out-Of-Memory (OOM) errors.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious font file (e.g., a BDF or PCF file) containing multiple glyphs, each configured with specific dimensions (e.g., maximum PCF glyph height of 65,535 pixels and width of 800 pixels). These individual glyph dimensions are carefully chosen to remain below Pillow's default <code>DecompressionBombWarning</code> and <code>DecompressionBombError</code> thresholds.</li>
<li>The attacker delivers this crafted font file to a vulnerable application that uses the Pillow library for font processing. This could occur via an upload mechanism to a web font preview service, as part of a document loaded by a server-side rendering engine, or through a font pipeline.</li>
<li>The vulnerable application loads the crafted font file using Pillow's <code>BdfFontFile.BdfFontFile(fp)</code> or <code>PcfFontFile.PcfFontFile(fp)</code> methods.</li>
<li>Subsequently, the application attempts to process or convert the loaded font, for example, by calling <code>to_imagefont()</code> or <code>save(filename)</code> on the font object.</li>
<li>This action internally triggers the <code>FontFile.compile()</code> method, which is responsible for assembling all per-glyph images into a single, large combined bitmap.</li>
<li>Within the <code>compile()</code> method, an <code>Image.new(&quot;1&quot;, (xsize, ysize))</code> call is executed to create the combined bitmap, but critically, it bypasses the <code>Image._decompression_bomb_check()</code> that would typically prevent excessively large allocations.</li>
<li>The unchecked allocation results in a massive memory consumption spike (e.g., 1.6 GB for 256 glyphs at max PCF height, representing 13.4 billion pixels). This rapid and excessive memory request often exceeds available system resources.</li>
<li>The application process then crashes due to an Out-Of-Memory (OOM) error, rendering the service unavailable and achieving a Denial of Service (DoS) for the affected system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The primary impact of CVE-2026-54060 is a high availability risk, leading to Denial of Service (DoS). Exploiting this vulnerability can cause applications utilizing the Pillow library for font processing to consume an unchecked, massive amount of memory, resulting in Out-Of-Memory (OOM) crashes. Affected scenarios include web services providing font previews, server-side font renderers, or any font pipeline that loads and processes BDF or PCF font files from untrusted sources. For example, a crafted font file can trigger a ~1.6 GB memory allocation, potentially up to 75 times the normal <code>DecompressionBombError</code> threshold, which is sufficient to crash most server-side processes. There is no observed impact on confidentiality or integrity.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch all systems using the Pillow library to version 12.3.0 or later immediately to address CVE-2026-54060.</li>
<li>Implement strict input validation and sanitization for any user-supplied font files before processing them with Pillow, especially for BDF and PCF formats.</li>
<li>Monitor application memory usage and process health, particularly for services that handle user-uploaded or externally sourced font files, to detect abnormal memory spikes that could indicate an attempted exploitation of CVE-2026-54060.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>vulnerability</category><category>denial-of-service</category><category>python</category><category>pillow</category><category>software-supply-chain</category></item></channel></rss>