Integer Overflow or Wraparound Affecting pillow package, versions [,13.0.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.35% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PILLOW-21431005
  • published22 Oct 2026
  • disclosed21 Oct 2026
  • creditMengxi-Xu

Introduced: 21 Oct 2026

NewCVE-2026-96641  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade pillow to version 13.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound via the textwidth function in src/_imaging.c, where accumulating negative glyph advance widths can cause the integer accumulator xsize to wrap below INT_MIN. An attacker can trigger this by supplying text whose cumulative rendered width underflows a signed 32-bit integer, causing an OverflowError that crashes the calling process.

CVSS Base Scores

version 4.0
version 3.1