CVE-2026-112398: Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution

Published Oct 19, 2026
·
Updated

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 JCSUNKNOWN 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.

Affected Software

1 affected component
pypi/Pillow<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 19, 2026
CVE Published
via MITRE·09:07 PM
Data Sourced
via MITRE·09:07 PM
DescriptionWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using Pillow versions before 13.0.0 are exposed when the optional olefile dependency is installed and the application opens or creates thumbnails for untrusted FlashPix (FPX) input.

2

What does an attacker need to exploit the vulnerability?

An attacker needs to provide a crafted OLE2 FlashPix file to an affected application. No authentication or user interaction is required according to the supplied CVSS vector, although successful exploitation has high attack complexity.

3

Is immediate upgrade the available remediation?

Yes. The issue is fixed in Pillow 13.0.0, so upgrading to version 13.0.0 or later remediates the vulnerable decoder behavior.

4

What can be done if Pillow cannot be upgraded immediately?

Avoid opening or thumbnailing untrusted FlashPix files in affected applications. The described attack path also requires the optional olefile dependency to be installed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203