{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/products/pillow--5.1.0--12.3.0/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[{"cvss":7.5,"id":"CVE-2026-59200"}],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["Pillow (\u003e= 5.1.0, \u003c 12.3.0)"],"_cs_severities":["low"],"_cs_tags":["denial-of-service","vulnerability","python","library","pdf"],"_cs_type":"advisory","_cs_vendors":["Pillow"],"content_html":"\u003cp\u003eA denial-of-service (DoS) vulnerability, tracked as CVE-2026-59200, has been identified in Pillow, a widely used Python imaging library. Specifically, the \u003ccode\u003ePdfParser.PdfStream.decode()\u003c/code\u003e function in \u003ccode\u003ePdfParser.py\u003c/code\u003e incorrectly utilizes the \u003ccode\u003eLength\u003c/code\u003e field from a PDF stream as the \u003ccode\u003ebufsize\u003c/code\u003e parameter for Python's \u003ccode\u003ezlib.decompress()\u003c/code\u003e. While \u003ccode\u003ebufsize\u003c/code\u003e is intended as an initial buffer hint, it does not impose a maximum memory limit, allowing \u003ccode\u003ezlib.decompress()\u003c/code\u003e to expand memory until the entire decompressed result is produced. An unauthenticated attacker can exploit this by crafting a specially designed PDF file containing a highly compressed FlateDecode stream. When an application using Pillow's \u003ccode\u003ePdfParser\u003c/code\u003e processes such a file, the malicious stream decompresses into a significantly larger memory footprint (e.g., a ~950 KB file can expand to 1 GB), leading to Out-of-Memory (OOM) errors and service termination or severe degradation for the host system. This vulnerability affects Pillow versions greater than or equal to 5.1.0 and less than 12.3.0.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAn attacker crafts a malicious PDF file containing a highly compressed FlateDecode stream.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003eLength\u003c/code\u003e or \u003ccode\u003eDL\u003c/code\u003e field within the PDF stream's dictionary is set to a value reflecting the compressed stream size.\u003c/li\u003e\n\u003cli\u003eThe attacker delivers the malicious PDF to a target application that uses \u003ccode\u003ePIL.PdfParser.PdfParser\u003c/code\u003e to process untrusted PDF files.\u003c/li\u003e\n\u003cli\u003eThe target application opens and parses the untrusted PDF using an instance of \u003ccode\u003ePdfParser.PdfParser\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe application attempts to access a compressed stream object from the parsed PDF, triggering a call to \u003ccode\u003ePdfStream.decode()\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eInside \u003ccode\u003ePdfStream.decode()\u003c/code\u003e, the \u003ccode\u003ezlib.decompress()\u003c/code\u003e function is invoked, passing the potentially large value from the PDF stream's \u003ccode\u003eLength\u003c/code\u003e field as its \u003ccode\u003ebufsize\u003c/code\u003e parameter.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ezlib.decompress()\u003c/code\u003e proceeds to expand the highly compressed stream, allocating memory far exceeding the compressed file size (e.g., a 95 KB file expanding to 100 MB or a 950 KB file expanding to 1 GB).\u003c/li\u003e\n\u003cli\u003eThis excessive memory allocation exhausts the available server memory, leading to an Out-of-Memory (OOM) error, process termination, or severe service degradation for the target application, effectively causing a denial of service.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eThis vulnerability directly leads to a denial-of-service condition. Any application that uses Pillow's \u003ccode\u003ePIL.PdfParser.PdfParser\u003c/code\u003e module to process untrusted PDF files is susceptible. An unauthenticated attacker can exploit this by submitting a relatively small (e.g., ~950 KB) malicious PDF file, which, when decompressed, consumes gigabytes of memory. This resource exhaustion will cause the server or application process to terminate due to Out-of-Memory errors or experience significant performance degradation, affecting all users and services relying on the vulnerable application. There is no specific victim count available, but any sector using Python applications that process untrusted PDFs with affected Pillow versions is at risk.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eImmediately patch Pillow installations (affected versions \u0026gt;= 5.1.0, \u0026lt; 12.3.0) to version 12.3.0 or higher to address CVE-2026-59200.\u003c/li\u003e\n\u003cli\u003eImplement resource monitoring for Python applications that process untrusted PDF files, focusing on memory usage spikes, to detect potential denial-of-service attempts.\u003c/li\u003e\n\u003cli\u003eReview any custom code interacting with \u003ccode\u003ePIL.PdfParser.PdfParser\u003c/code\u003e and consider implementing explicit size checks for decompressed data, similar to the \u003ccode\u003eMAX_DECOMPRESS_BYTES\u003c/code\u003e example provided in the source material, to prevent unbounded memory allocation.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-07-20T23:12:09Z","date_published":"2026-07-20T23:12:09Z","id":"https://feed.craftedsignal.io/briefs/2026-07-pillow-pdfparser-dos/","summary":"A denial-of-service vulnerability (CVE-2026-59200) exists in Pillow's `PdfParser.PdfStream.decode()` function across versions 5.1.0 to 12.2.x, allowing an unauthenticated attacker to craft a malicious PDF file that, when processed by a vulnerable application, triggers excessive memory allocation (e.g., a ~950 KB file expanding to 1 GB), leading to server Out-of-Memory termination or severe service degradation.","title":"Pillow Decompression Bomb DoS via PdfParser.PdfStream.decode()","url":"https://feed.craftedsignal.io/briefs/2026-07-pillow-pdfparser-dos/"}],"language":"en","title":"CraftedSignal Threat Feed - Pillow (\u003e= 5.1.0, \u003c 12.3.0)","version":"https://jsonfeed.org/version/1.1"}