python-pillow Pillow up to 13.1.0 ImageMath src/_imagingmath.c integer overflow

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
3.7$0-$5k0.64+

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒

CVSSv3info

VulDB Meta Base Score: 3.7
VulDB 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): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Integer overflow
CWE: CWE-190 / CWE-189
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: no mitigation known
Status: 🔍

0-Day Time: 🔒

Timelineinfo

11/27/2026 Advisory disclosed
11/27/2026 +0 days CVE reserved
11/27/2026 +0 days VulDB entry created
11/27/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: github.com
Status: Not defined

CNA: AISLE
CVE: CVE-2026-137940 (🔒)

GCVE (CVE): GCVE-0-2026-137940
GCVE (VulDB): GCVE-100-444839

Entryinfo

Created: 11/27/2026 15:04
Changes: 11/27/2026 15:04 (76)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to stay up to date on a daily basis?

Enable the mail alert feature now!