Security fix · CVE-2026-96641
Pillow is a Python imaging library.
Published Oct 21, 2026 · catalog updated Oct 28, 2026 · Pillow is a Python
Last checked Oct 31, 2026. A connected source was read within the last 7 days.
Check if you run it
No confirmed exploitation is on record for CVE-2026-96641. EPSS is 0.34%. Act only if a listed version of Pillow is a Python is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
Same product and reporting
- CVE-2026-96640 · High
- CVE-2026-96778 · High
- CVE-2026-42311 · High
- CVE-2026-42310 · Medium
- CVE-2026-42309 · Medium
- Severity
- Medium6.5
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.34%
- Remediation
- Version ranges on file
- Affected products
- PyPI pillow · cpe python/pillow · package pip · pip pillow · pypi pillow
### Summary Affected Object and Source Package: Pillow 12.3.0 Source: PyPI sdist pillow-12.3.0.tar.gz SHA-256: 3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce Sink: src/_imaging.c:2809:15, xsize += dx ### Details The code in Pillow 12.3.0 is: The PILfont glyph advance is parsed from a signed 16-bit field, so the valid range for is . The existing check only proves: It does **not** prove the other half of the contract: Taking and repeating it 65,537 times, the mathematical sum is , which is less than . On the 65,537th addition, the operation is performed, resulting in **C signed overflow undefined behavior**. ### PoC Observations from a regular 12.3.0 release build: The adjacent control uses 65,536 repetitions, producing a mathematical result of exactly , and the function subsequently returns 0 according to existing semantics. Adding just a single character flips the return value to . ### Impact The directly confirmed impact is width semantic integrity violation: getlength() and boundary calculations based on getsize() may return a huge positive value, while the true mathematical width is negative. The high-level getmask() typically passes through the decompression-bomb check, which mitigates the risk of direct massive allocation; however, internal font objects and applications that use the width for layout, quotas, serialization, or subsequent allocations may be affected by resource consumption or logic errors. Therefore, the current recommended severity rating is "Reachable native integer undefined behavior, with potential DoS/logic integrity impact; specific security severity to be confirmed by the upstream threat model", rather than a memory corruption vulnerability. ### Recommended Patch and Regression Tests It is recommended to extend the overflow check to cover both directions: At a minimum, four test cases should be added: 1. — upper adjacent control (should succeed); 2. — should raise ; 3. — lower adjacent control (should succeed); 4. — shoul
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- PyPI pillow0 → 13.0.0
- cpe python/pillow< 13.0.0
- package pipversion unspecified
- pip pillow< 13.0.0
- pypi pillowversion unspecified
How to fix CVE-2026-96641
Upgrade
CVE-2026-96641 lists a fix boundary at 13.0.0. Compare the installed build with that boundary before you change production.
Version check
Affected < 13.0.0
Advisory
Open the cve_org record and follow its fix.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2026-96641. EPSS is 0.34%. Act only if a listed version of Pillow is a Python is installed.
Which versions are affected?
Compare what you have installed with 0 → 13.0.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-190: Integer Overflow. EPSS 0.34%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 21, 2026 · NIST NVD
Detected
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 tha
Oct 22, 2026 · GitHub Advisory Database
Updated
### Summary Affected Object and Source Package: Pillow 12.3.0 Source: PyPI sdist pillow-12.3.0.tar.gz SHA-256: 3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce Sink: src/_imaging.c:2809:15, xsize += dx ### Details The code in Pillow 12.3.0 is: The PILfont glyph advance is parsed from a signed 16-bit field, so the valid range for is . The existing check only proves: It does **not**
Oct 28, 2026 · NIST NVD
Updated
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 tha
Oct 28, 2026 · PyPA Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 28, 2026 · PyPA Advisory Database
Fix available
pillow fixed in 13.0.0
Oct 28, 2026 · PyPA Advisory Database
Updated
### Summary Affected Object and Source Package: Pillow 12.3.0 Source: PyPI sdist pillow-12.3.0.tar.gz SHA-256: 3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce Sink: src/_imaging.c:2809:15, xsize += dx ### Details The code in Pillow 12.3.0 is: The PILfont glyph advance is parsed from a signed 16-bit field, so the valid range for is . The existing check only proves: It does **not**
Sources
- CVE.orgVulnerability recordCVE-2026-96641
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-96641
30-day exploitation probability 0.34%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-4rm8-3hmm-39fg
Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise
github.com - GitLab Advisory DatabasePackage advisoryCVE-2026-96641
Affected Object and Source Package: Pillow 12.3.0 Source: PyPI sdist pillow-12.3.0.tar.gz SHA-256: 3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce Sink: src/_imaging.c:2809:15, xsize += dx
advisories.gitlab.com - NIST NVDVulnerability recordCVE-2026-96641
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
nvd.nist.gov - OpenCVEVendor advisoryCVE-2026-96641
CVE-2026-96641 is named on the public OpenCVE page.
opencve.io - PyPA Advisory DatabasePackage advisoryGHSA-4rm8-3hmm-39fg
Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise
osv.dev - Snyk Vulnerability DatabasePackage advisorySNYK-PYTHON-PILLOW-21431005
Integer Overflow or Wraparound
security.snyk.io
References
Freshness
Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.
- PyPA Advisory DatabaseOct 28, 2026
- FIRST EPSSOct 28, 2026
- NIST NVDOct 28, 2026
- OpenCVEOct 28, 2026
- Snyk Vulnerability DatabaseOct 24, 2026
- GitLab Advisory DatabaseOct 23, 2026
- GitHub Advisory DatabaseOct 23, 2026
- CVE.orgOct 22, 2026