{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/vendors/python-pillow/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":["cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*"],"_cs_cves":[{"cvss":7.5,"id":"CVE-2026-54059"}],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["Pillow (\u003c 12.3.0)"],"_cs_severities":["low"],"_cs_tags":["denial-of-service","vulnerability-exploitation","python"],"_cs_type":"advisory","_cs_vendors":["python-pillow"],"content_html":"\u003cp\u003eA critical vulnerability, tracked as CVE-2026-54059, has been identified in the Python Imaging Library (Pillow) affecting versions prior to 12.3.0. The flaw resides within the \u003ccode\u003ePcfFontFile._load_bitmaps()\u003c/code\u003e function, which is responsible for loading PCF font files. Attackers can craft a malicious PCF font file where the \u003ccode\u003eMETRICS\u003c/code\u003e section declares excessively large glyph dimensions (up to 65,535 x 131,070 pixels). These attacker-controlled dimensions are then passed directly to \u003ccode\u003eImage.frombytes()\u003c/code\u003e without first undergoing the \u003ccode\u003e_decompression_bomb_check()\u003c/code\u003e. This bypass allows for a decompression bomb, potentially leading to massive memory allocations (over 1 GB per glyph) and resulting in a denial-of-service (DoS) condition due to resource exhaustion. The vulnerability can manifest as either a transient attack, where a small PCF file triggers a large allocation before a \u003ccode\u003eValueError\u003c/code\u003e, or a persistent attack, where a larger PCF file with matching bitmap data leads to a sustained memory burden. Any service or application that processes PCF font files from untrusted sources using vulnerable Pillow versions is susceptible. This issue was confirmed unpatched as of June 7, 2026, on the \u003ccode\u003emain\u003c/code\u003e branch.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAn attacker crafts a specially designed PCF (Portable Compiled Format) font file.\u003c/li\u003e\n\u003cli\u003eThe malicious PCF file includes a \u003ccode\u003eMETRICS\u003c/code\u003e section that specifies unusually large dimensions for the font glyphs, such as 65535 for width and 131070 for height.\u003c/li\u003e\n\u003cli\u003eThe attacker delivers this malicious PCF file to a target system or application. This could be via email, file upload, or any method allowing the application to process an untrusted font.\u003c/li\u003e\n\u003cli\u003eA vulnerable application using Pillow (versions prior to 12.3.0) attempts to load the malicious PCF font file using the \u003ccode\u003ePcfFontFile\u003c/code\u003e class.\u003c/li\u003e\n\u003cli\u003eDuring the font loading process, specifically within \u003ccode\u003ePcfFontFile._load_bitmaps()\u003c/code\u003e, the declared large \u003ccode\u003exsize\u003c/code\u003e and \u003ccode\u003eysize\u003c/code\u003e values are read from the \u003ccode\u003eMETRICS\u003c/code\u003e section.\u003c/li\u003e\n\u003cli\u003eThese large dimensions are then directly passed to \u003ccode\u003eImage.frombytes()\u003c/code\u003e without invoking Pillow's internal \u003ccode\u003e_decompression_bomb_check()\u003c/code\u003e, which normally prevents excessive memory allocations.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eImage.frombytes()\u003c/code\u003e internally calls \u003ccode\u003eImage.new()\u003c/code\u003e, which proceeds to allocate a significantly large C-heap buffer (potentially over 1 GB) based on the attacker-controlled dimensions.\u003c/li\u003e\n\u003cli\u003eThis massive memory allocation consumes system resources, leading to resource exhaustion and a denial-of-service (DoS) condition for the affected application or system.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eThis vulnerability poses a significant availability risk to any service or application that loads PCF fonts from untrusted sources. Attackers can trigger high-impact denial-of-service (DoS) conditions by causing excessive memory allocation, with the potential for over 1.07 GB of memory to be consumed per glyph within a font file. There are no inherent limits to the number of glyphs per font file or the number of font files an attacker could submit, potentially leading to complete system resource exhaustion. The vulnerability allows for both transient memory spikes, where a small 148-byte malicious file can trigger a gigabyte-scale allocation before an error, and persistent consumption if the bitmap data is also crafted to match. The confidentiality and integrity of data are not directly affected by this vulnerability.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003ePatch CVE-2026-54059 by updating the \u003ccode\u003epip/pillow\u003c/code\u003e package to version 12.3.0 or later immediately.\u003c/li\u003e\n\u003cli\u003eConfigure applications and services to explicitly avoid loading PCF font files from untrusted or external sources.\u003c/li\u003e\n\u003cli\u003eEnsure that any Python environment running applications that process image or font files has \u003ccode\u003ePillow\u003c/code\u003e updated to a non-vulnerable version.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-07-20T21:15:44Z","date_published":"2026-07-20T21:15:44Z","id":"https://feed.craftedsignal.io/briefs/2026-07-pillow-pcf-font-bomb-bypass/","summary":"A vulnerability in Pillow's `PcfFontFile._load_bitmaps()` function allows for a decompression bomb check bypass when loading PCF fonts. Attacker-controlled glyph dimensions from the PCF `METRICS` section are passed directly to `Image.frombytes()` without validation, leading to excessive memory allocation. This can be exploited to cause denial of service (resource exhaustion) through either persistent attacks by providing matching bitmap data or transient attacks by providing a small PCF file with large declared dimensions, leading to a large C-heap buffer allocation before an exception. Systems loading PCF fonts from untrusted sources are at risk.","title":"Pillow Decompression Bomb Bypass via PCF Font Loading","url":"https://feed.craftedsignal.io/briefs/2026-07-pillow-pcf-font-bomb-bypass/"}],"language":"en","title":"CraftedSignal Threat Feed - Python-Pillow","version":"https://jsonfeed.org/version/1.1"}