CVE-2026-137940: Pillow through 13.1.0 Crash via ImageMath INT32_MIN Division by -1

Published Nov 27, 2026
·
Updated

Pillow through 13.1.0 contains an integer overflow in the ImageMath integer divide and modulo operators (DIVI and MODI in src/imagingmath.c), which guard only against a zero divisor, so dividing INT32MIN by -1 raises a hardware divide exception. Attackers can supply a crafted TIFF that decodes to a mode I image containing INT32MIN, crashing applications that run an ImageMath divide or modulo with a -1 operand on it.

Affected Software

1 affected component
pypi/Pillow<=13.1.0

Event History

Nov 27, 2026
CVE Published
via MITRE·01:43 PM
Data Sourced
via MITRE·01:43 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:17 PM
DescriptionSeverityWeakness
Event
via NVD·02:17 PM

Frequently Asked Questions

1

What conditions are required to trigger the crash?

An attacker must provide a crafted TIFF that decodes to a mode I image containing the INT32_MIN value. The application must then use Pillow ImageMath division or modulo with -1 as the other operand.

2

Are applications that only process ordinary image inputs affected?

The issue specifically requires a TIFF crafted to decode as a mode I image with INT32_MIN. It also requires an ImageMath DIV_I or MOD_I operation using -1, so processing the image alone is not sufficient based on the available information.

3

What is the impact of successful exploitation?

Successful triggering raises a hardware divide exception and crashes the affected application. The provided severity vector indicates availability impact only, with no stated confidentiality or integrity impact.

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