PyPI
CVE-2026-137940
Pillow through 13.1.0 Crash via ImageMath INT32_MIN Division by -1
- Severity
- Medium 5.7
- Published
- 27 Nov 2026
- Last changed
- 27 Nov 2026
- Added to UpHeron
- 27 Nov 2026
- Exploit chance
- 0.2% in the next 30 daysHigher than 3% of CVEs. EPSS by FIRST, 29 Nov 2026
- Weakness
- Integer overflow (CWE-190)
- Attack
- Needs local access · Only under certain conditions · No login needed · Needs someone to view a page or file
- Attacker can
- Take it down
- 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- Sources
- CVE Program
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.
Affected software
| Software | Affected versions |
|---|---|
pillowPyPI · osv:PyPI:pillow |
|
Status in Debian
Debian builds fixes into its own packages, so a release is often fixed under an older version number than the one upstream names.
- 4 vulnerable
| Package | Debian release | Status |
|---|---|---|
| pillow | sidunstable | VulnerableNo fix yet. |
| 14forkytesting | VulnerableNo fix yet. | |
| 13trixiestable | VulnerableNo fix yet. | |
| 12bookwormoldstable | VulnerableNo fix yet. |
From Debian's security tracker for CVE-2026-137940 , read in the last 12 hours.
About pillow
- Weekly downloads (PyPI)
- 162,458,184PyPI Stats, 24 Nov 2026
Vulnerabilities in pillow
- In our list
- 3
- Published in the last 12 months
- 3
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-128066Pillow: Memory DoS in TIFF and EXIF IFD parsing via overlapping tag dataMedium 12 Nov 2026
- CVE-2026-128067Pillow: Heap buffer overflow saving TIFF with libtiff when tags override image sizeHigh 12 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-137940