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

- Severity: Medium 5.7 (CVSS:4.0, scored by AISLE) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-11-27T13:43:54.744Z
- Modified: 2026-12-01T20:18:55.787Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: AISLE

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

(As written by CVE List.)

## Affected

- pillow: before 13.1.0

## Every score

- AISLE: CVSS:4.0 5.7 Medium `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`
- AISLE: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://github.com/python-pillow/Pillow/security/advisories/GHSA-rr9w-vmjp-9cg9>
- <https://github.com/python-pillow/Pillow>

## Sources

- CVE List: [CVE-2026-137940](https://www.cve.org/CVERecord?id=CVE-2026-137940), CVE Terms of Use, modified 2026-12-01
- NVD: [CVE-2026-137940](https://nvd.nist.gov/vuln/detail/CVE-2026-137940), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-137940 · Whole record: https://cve.day/CVE-2026-137940.json · Rebuilt by cve.day 2026-12-01T20:32:47.849Z
