CVE-2026-96641: Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise

Published Oct 21, 2026
·
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 INTMAX but does not check negative advances against INTMIN. 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 Software

1 affected component
pypi/Pillow<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 21, 2026
CVE Published
via MITRE·08:51 PM
Data Sourced
via MITRE·08:51 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are realistically exposed?

Applications using Pillow versions before 13.0.0 are exposed if they call PILfont text-measurement functionality such as getlength(), getsize(), or calculations derived from those results. Risk is greatest where those measurements feed layout, quotas, serialization, or allocation decisions.

2

What does exploitation require?

An attacker needs to cause repeated glyph advances of -32768 during text-width accumulation. The vector is network-reachable in affected applications that process attacker-influenced text or font-related inputs, and user interaction is required according to the supplied severity vector.

3

Is a denial of service the only possible impact?

No. The overflow can turn a negative mathematical width into a large positive value, which can cause logic-integrity errors as well as resource consumption or denial of service. The high-level mask path commonly retains a decompression-bomb check, but that does not eliminate risks in downstream layout, quota, serialization, or allocation handling.

4

What should teams do if they cannot immediately upgrade?

Avoid using affected text-width results in allocation, quota, serialization, or other security-sensitive decisions when processing untrusted inputs. Where possible, restrict or validate inputs that can trigger repeated negative glyph advances and impose resource limits around downstream processing.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203