Vulnerability · Published Oct 21, 2026 · Assigned by GitHub_M
CVE-2026-96641Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise
Medium 6.5
In plain English
A medium-severity integer overflow in Pillow from python-pillow. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 28% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Pillow is a Python imaging library. Prior to 13.0.0, PILfont text-width accumulation in src/_imaging.c checks positive glyph advances against INT_MAX but does not check negative advances against INT_MIN. Repeating a signed 16-bit advance of -32768 can therefore execute a signed C integer overflow in xsize += dx, producing a large positive width from a negative mathematical result. Applications that use getlength(), getsize(), or derived layout, quota, serialization, or allocation calculations can experience logic-integrity errors or resource consumption, while the high-level mask path commonly retains a decompression-bomb check. This issue is fixed in version 13.0.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pillow | no fix listed | DEBIAN-CVE-2026-96641 |
| Debian:13 | pillow | no fix listed | DEBIAN-CVE-2026-96641 |
| Debian:14 | pillow | no fix listed | DEBIAN-CVE-2026-96641 |
| PyPI | pillow | 13.0.0 | GHSA-4rm8-3hmm-39fg |
| PyPI | pillow | 13.0.0 | PYSEC-2026-4340 |
| Ubuntu:22.04:LTS | pillow | no fix listed | UBUNTU-CVE-2026-96641 |
| Ubuntu:24.04:LTS | pillow | no fix listed | UBUNTU-CVE-2026-96641 |
| Ubuntu:26.04:LTS | pillow | no fix listed | UBUNTU-CVE-2026-96641 |
| Ubuntu:26.10 | pillow | no fix listed | UBUNTU-CVE-2026-96641 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| python-pillow | Pillow | < 13.0.0 |
Weakness: CWE-190 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
References
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-4rm8-3hmm-39fg x_refsource_CONFIRM
- https://github.com/python-pillow/Pillow/pull/10010 x_refsource_MISC
- https://github.com/python-pillow/Pillow/commit/80de4be9e38d3a6148dd4d8491eb80cd12b760a4 x_refsource_MISC
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0 x_refsource_MISC