Vulnerability Description
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.
CVSS Score
MEDIUM
Related Weaknesses (CWE)
References
- https://github.com/python-pillow/Pillow
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-rr9w-vmjp-9cg9
FAQ
What is CVE-2026-137940?
CVE-2026-137940 is a vulnerability with a CVSS score of 4.7 (MEDIUM). 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 IN...
How severe is CVE-2026-137940?
CVE-2026-137940 has been rated MEDIUM with a CVSS base score of 4.7/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-137940?
Check the references section above for vendor advisories and patch information. Review vendor security bulletins for remediation guidance.