{"id":"CVE-2026-112398","published":"2026-10-19T21:07:25Z","modified":"2026-10-22T21:06:17Z","title":"Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"Pillow is a Python imaging library. Prior to 13.0.0, Pillow's FlashPix JPEG-tile decoder can write decoded scanlines beyond the allocated tile buffer. FlashPix (FPX) JPEG decoding selects raw mode LA with two bytes per pixel, while an unrecognized JPEG mode can be decoded as JCS_UNKNOWN with four components, causing ImagingJpegDecode to write four-component scanlines into the two-byte tile buffer. An attacker can supply a crafted OLE2 FlashPix file to an application with the optional olefile dependency installed that opens or thumbnails untrusted input. This can corrupt heap memory and may allow arbitrary code execution. This issue is fixed in version 13.0.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.2,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00696,"percentile":0.53925,"provenance":"source"},"cwes":[{"id":"CWE-122","name":"Heap-based Buffer Overflow"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-5x8w-8jj5-q52h","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":22.2,"factors":[{"name":"EPSS percentile","points":10.79},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.44}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-10-23","earliestUrl":"https://github.com/mcpmark-eval-liuhezi/security-advisory-research","repos":[{"name":"mcpmark-eval-liuhezi/security-advisory-research","url":"https://github.com/mcpmark-eval-liuhezi/security-advisory-research","stars":0,"created":"2026-10-23"}]},"first":{"date":"2026-10-23","source":"PoC-in-GitHub","url":"https://github.com/mcpmark-eval-liuhezi/security-advisory-research"},"provenance":"source"},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":["< 13.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-10-22T21:05:55.203396Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pillow","vulnerableRanges":["<13.0.0"],"patched":["13.0.0"],"from":["GHSA-5x8w-8jj5-q52h","PYSEC-2026-4330"],"provenance":"source"}],"summary":{"text":"A heap-based buffer overflow in Pillow's FlashPix JPEG-tile decoder lets decoded scanlines be written past the allocated tile buffer when a crafted OLE2 FlashPix file is processed, affecting versions before 13.0.0 of the Pillow Python imaging library. An unauthenticated attacker over the network can exploit it by supplying an untrusted file to an application that has the optional olefile dependency installed and opens or thumbnails it, with no user interaction beyond that processing, and the resulting heap corruption may allow arbitrary code execution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:22:26Z"},"euvd":{"id":"EUVD-2026-104634","exploited":false,"provenance":"source"}}