CVE-2026-137940: python-pillow Integer Overflow or Wraparound

CVE-2026-137940

NVD

Vulnerability Summary

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.
Severity Level
MEDIUM(5.7)
Published Date
Nov 27, 2026
Last Modified
Nov 27, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.17%Probability
Root Weakness (CWE)
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes the resulting value will always be larger than the original.
CVSS v4.0 Base Metrics — Score 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
Attack VectorLocal
Attack ComplexityHigh
Attack RequirementsPresent
Privileges RequiredNone
User InteractionPassive
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)None
Availability (Vulnerable System)High
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Show CVSS v3.x metrics (score 4.7)
CVSS v3.1 Base Metrics — Score 4.7 (MEDIUM)
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
Attack VectorLocal
Attack ComplexityHigh
Privileges RequiredNone
User InteractionRequired
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • python-pillow <= 13.1.0
Patched Versions
  • python-pillow 13.1.0

What to do

Fix it during your normal patch cycle. No exploitation is confirmed yet.

  1. Check whether you run python-pillow and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • Nov 27, 2026Published
  • Nov 27, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new python-pillow CVEsYou are reading CVE-2026-137940. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Nov 30, 2026 00:39 UTC