python-pillow Pillow up to 13.1.0 ImageMath src/_imagingmath.c integer overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 3.7 | $0-$5k | 0.64+ |
Summary
A vulnerability has been found in python-pillow Pillow up to 13.1.0 and classified as problematic. Affected is an unknown function of the file src/_imagingmath.c of the component ImageMath. The manipulation leads to integer overflow. This vulnerability is traded as CVE-2026-137940. An attack has to be approached locally. There is no exploit available.
Details
A vulnerability was found in python-pillow Pillow up to 13.1.0 and classified as problematic. This issue affects an unknown part of the file src/_imagingmath.c of the component ImageMath. The manipulation with an unknown input leads to a integer overflow vulnerability. Using CWE to declare the problem leads to CWE-190. The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number. Impacted is availability. The summary by CVE is:
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.
It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2026-137940 since 11/27/2026. The exploitation is known to be easy. Attacking locally is a requirement. It demands that the victim is doing some kind of user interaction. Technical details of the vulnerability are known, but there is no available exploit.
There is no information about possible countermeasures known. It may be suggested to replace the affected object with an alternative product.
Be aware that VulDB is the high quality source for vulnerability data.
Product
Type
Vendor
Name
Version
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 3.7VulDB Meta Temp Score: 3.7
VulDB Base Score: 2.8
VulDB Temp Score: 2.7
VulDB Vector: 🔒
VulDB Reliability: 🔍
CNA Base Score: 4.7
CNA Vector (AISLE): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Integer overflowCWE: CWE-190 / CWE-189
CAPEC: 🔒
ATT&CK: 🔒
Physical: Partially
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: no mitigation knownStatus: 🔍
0-Day Time: 🔒
Timeline
11/27/2026 Advisory disclosed11/27/2026 CVE reserved
11/27/2026 VulDB entry created
11/27/2026 VulDB entry last update
Sources
Product: github.comAdvisory: github.com
Status: Not defined
CNA: AISLE
CVE: CVE-2026-137940 (🔒)
GCVE (CVE): GCVE-0-2026-137940
GCVE (VulDB): GCVE-100-444839
Entry
Created: 11/27/2026 15:04Changes: 11/27/2026 15:04 (76)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.