Pillow before 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 IN…
- CVSS
- 4.7Medium
- Chance of exploitation (EPSS)
- 0.17%
- Published
- Nov 27, 2026
- In the news
- Not yet
What to do
A moderate security flaw in Python-pillow Pillow that needs access to the machine itself. No attacks are reported yet; it can go in your normal patch cycle.
Action: Check the vendor's advisory in the references and apply updates as soon as they are available.
Fixed in: 13.1.0
Affected versions
- Python-pillow Pillow
- Before 13.1.0
Description
Pillow before 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.
Affected products
Get alerts for these →Timeline 2
Latest change: Nessus plugin 387648: Linux Distros Unpatched Vulnerability : CVE-2026-137940 (Nov 29, 2026)
News, advisories, exploit code, scanner detection and exploitation, newest first.
Mon, Nov 30, 2026
Fri, Nov 27, 2026
- CVECVE-2026-137940 published (CVSS 4.7)CVE Program · 14:17 UTC
References 2
- github.com /python-pillow/Pillow
- github.com /python-pillow/Pillow/security/advisories/GHSA-rr9w-vmjp-9cg9