Integer overflow in Pillow - CVE-2026-96641

 

Integer overflow in Pillow - CVE-2026-96641

Published: November 3, 2026


Vulnerability identifier: #VU158916
CSH Severity: Medium
CVSS v4: 6.7 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-96641
CWE-ID: CWE-190
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to potentially cause a denial of service.

The vulnerability exists due to signed integer overflow in Pillow's native text-width calculation in src/_imaging.c when accumulating negative glyph advances without checking the lower integer bound. A remote attacker can induce a user to process a crafted PILfont bitmap font and text containing 65,537 repetitions of a glyph with an advance of -32768 to trigger undefined behavior, produce an incorrect width, and potentially cause a denial of service through subsequent resource consumption.


Affected software

Pillow

How to mitigate CVE-2026-96641

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins