{"schemaVersion":4,"id":"CVE-2026-137940","aliases":["DEBIAN-CVE-2026-137940","UBUNTU-CVE-2026-137940"],"status":"published","duplicateOf":null,"title":"Pillow before 13.1.0 Crash via ImageMath INT32_MIN Division by -1","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.","dates":{"published":"2026-11-27T13:43:54.744Z","modified":"2026-12-01T19:38:21.156Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.7,"severity":"medium","version":"4.0","versionLabel":"v4.0","source":"CVE.org","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","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":5.7,"severity":"medium","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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":4.7,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":5.7,"severity":"medium","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":4.7,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Debian","score":5.7,"severity":"medium","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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Ubuntu","score":5.7,"severity":"medium","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":4.7,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H","exploitability":2.6,"impact":6,"computed":true}]},"epss":{"probability":0.00172,"percentile":0.06887,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-11-28T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00172,"percentile":0.06887}],"last30":[{"date":"2026-11-28T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00172,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00172,"percentile":0.06887}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-190","name":"Integer Overflow or Wraparound","description":"The product performs a calculation that can\n         produce an integer overflow or wraparound when the logic\n         assumes that the resulting value will always be larger than\n         the original value. This occurs when an integer value is\n         incremented to a value that is too large to store in the\n         associated representation. When this occurs, the value may\n         become a very small or negative number.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/190.html"}],"affected":[{"vendor":"debian","product":"pillow","name":"pillow","label":"pillow","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/pillow","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"pillow","name":"pillow","label":"pillow","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/pillow","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"pillow-python2","name":"pillow-python2","label":"pillow-python2","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/pillow-python2","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null,"bounds":{"kind":"all"}}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"python-pillow","product":"pillow","name":"Pillow","label":"pillow","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 13.1.0","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"13.1.0","endInclusive":false}}],"versionsText":"< 13.1.0","eol":null,"hubHref":"/vendor/python-pillow/pillow"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-rr9w-vmjp-9cg9","label":"github.com/python-pillow/Pillow/security/advisories/GHSA-rr9w-vmjp-9cg9","hostname":"github.com","tags":["REPORT"]},{"url":"https://github.com/python-pillow/Pillow","label":"github.com/python-pillow/Pillow","hostname":"github.com","tags":[]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-137940","label":"security-tracker.debian.org/tracker/CVE-2026-137940","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-137940","label":"ubuntu.com/security/CVE-2026-137940","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-137940","label":"www.cve.org/CVERecord?id=CVE-2026-137940","hostname":"www.cve.org","tags":["REPORT"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-11-27T13:43:54.744Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-12-01T19:38:21.156Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 5.7, local access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,0,57],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00172,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.7,"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","version":"4.0","headline":true},{"type":"cvss","source":"cve.org","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},{"type":"cvss","source":"nvd","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.7,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","version":"4.0"},{"type":"cvss","source":"nvd","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},{"type":"cvss","source":"osv_debian","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.7,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","version":"4.0"},{"type":"cvss","source":"osv_ubuntu","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":5.7,"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","version":"4.0"},{"type":"cvss","source":"osv_ubuntu","date":"2026-12-01T19:38:21.156Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":4.7,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-11-30T15:48:41.755Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00172,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T03:02:07.274Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T03:02:07.824Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T03:02:08.009Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T03:00:58.365Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T03:02:05.166Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T03:02:04.195Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T03:16:29.100Z","stale":false,"partial":false}}