CVE-2026-42308 Pillow: Integer overflow when processing fonts

Medium 5.1 Published Updated

An attacker can cause a denial of service in applications using Pillow by providing a font with excessively large glyph advances, triggering an integer overflow.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-42308?

CVE-2026-42308 is a medium-severity vulnerability in Python Pillow, published on 9 May 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Pillow is a Python imaging library. Prior to version 12.2.0, if a font advances for each glyph by an exceeding large amount, when Pillow keeps track of the current position, it may lead to an integer overflow. This issue has been patched in version 12.2.0.

Weakness: CWE-190

Which versions are affected by CVE-2026-42308?

4 open source packages ship an affected version, including pillow. It affects 1 product.

PackageAffectedFixed in
pillow BitnamiAll versions12.2.0
pillow PyPIAll versions12.2.0
pillow PyPIAll versions12.2.0
pillow PyPIAll versions12.2.0

Products include Python Pillow.

How do I fix CVE-2026-42308?

Upgrade pillow to 12.2.0 or later.

Is CVE-2026-42308 being exploited?

There is no known exploitation of CVE-2026-42308 in the wild and no public exploit code.

All Python Pillow vulnerabilities

Sources

Also known as BIT-pillow-2026-42308, CLEANSTART-2026-GE72398, CLEANSTART-2026-YZ67479, DEBIAN-CVE-2026-42308, ECHO-784c-565e-18bc, GHSA-wjx4-4jcj-g98j and 9 more.

Is CVE-2026-42308 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free