CVE-2026-137940 PUBLISHED

Pillow through 13.1.0 Crash via ImageMath INT32_MIN Division by -1

Assigner: AISLE
Reserved: 27.11.2026 Published: 27.11.2026 Updated: 27.11.2026

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

Metrics

CVSS Vector: CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS Score: 5.7

Product Status

Vendor python-pillow
Product Pillow
Versions Default: unaffected
  • affected from 0 to 13.1.0 (incl.)

Credits

  • Joshua Rogers (AISLE Research) finder

References

Problem Types

  • Integer Overflow or Wraparound CWE