Junglewise Threat Intelligence

CVE-2026-42308: Pillow integer overflow in font glyph processing

CVE-2026-42308 · Severity: medium · CVSS 5.5 · Published 2026-05-09

Technologies: Python-Pillow Pillow. Vendors: PyPI.

Executive brief

Pillow is a widely used Python library for opening, manipulating, and saving many different image file formats. A vulnerability in how the library handles text rendering could allow a malicious font file to cause the application to crash or behave unexpectedly. This could lead to a service outage for applications that process user-provided fonts or images containing text.

Technical details

An integer overflow vulnerability (CWE-190) exists in Pillow's font rendering logic. When processing a font where glyphs have excessively large advancement values, the internal tracking of the current rendering position can overflow. This occurs when the library calculates the next position by adding large extents together. An attacker providing a specially crafted font file could trigger this overflow, potentially leading to a denial-of-service (DoS) via application crash. The issue is addressed in version 12.2.0 by using 'long' types for glyph positions and implementing checks to avoid adding extents that would result in an overflow.

Affected products

  • python-pillow Pillow < 12.2.0

Timeline

  • 2026-04-23: advisory: Vendor advisory published on GitHub
  • 2026-05-09: disclosed: CVE published to NVD
  • 2026-04-01: patched: Version 12.2.0 released

References

Related threats