PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2026-42308: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-42308 is an integer overflow vulnerability in Pillow, the widely-used Python imaging library. When processing fonts, if a font's advance value for each glyph is an excessively large amount, Pillow's internal tracking of the current rendering position can overflow an integer, potentially causing a crash or denial of service. All Pillow versions prior to 12.2.0 are affected. The vulnerability was published to the GitHub Advisory Database on May 4, 2026, and to the NVD on May 9, 2026. It carries a CVSS v3.1 base score of 5.5 (Medium) and a CVSS v4.0 base score of 5.1 (Medium) (Github Advisory, Pillow Advisory).

Technical details

The root cause is an integer overflow or wraparound (CWE-190) in Pillow's font rendering code. When Pillow processes a font and accumulates glyph advance values to track the current drawing position, supplying a crafted font with abnormally large per-glyph advance values causes the position counter to overflow its integer bounds. The attack vector is local, requiring an attacker to supply a malicious font file to an application using Pillow for text rendering; no special privileges are required under CVSS v4.0 scoring. The fix in version 12.2.0 addresses this by using a long type for glyph position tracking (commit referenced as "Use long for glyph position" in the release notes) (Pillow Advisory, Pillow Release).

Impact

Successful exploitation results in an availability impact — specifically, an integer overflow that can cause the affected Pillow process to crash or behave unexpectedly when rendering text with a malicious font. There is no confidentiality or integrity impact identified; the vulnerability is limited to a denial-of-service condition within the vulnerable system. Applications that accept user-supplied fonts or process untrusted font files are most at risk, as an attacker could trigger repeated crashes to disrupt image generation services (Github Advisory).

Exploitability

No public proof-of-concept exploit code or evidence of in-the-wild exploitation has been reported for CVE-2026-42308. The EPSS score is approximately 0.014–0.017%, placing it in the 4th percentile for exploitation likelihood within 30 days. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been identified (Github Advisory).

Mitigation and workarounds

The primary remediation is to upgrade Pillow to version 12.2.0 or later, which contains the fix for this integer overflow. No configuration-based workaround has been published; upgrading is the only recommended mitigation. Downstream distributions including Red Hat, SUSE, Ubuntu, and Amazon Linux have issued their own security updates incorporating this fix (Pillow Release, Red Hat Advisory, Ubuntu Advisory, SUSE Advisory).

Community reactions

The vulnerability received routine coverage from Linux distribution security teams, with Red Hat, SUSE, Ubuntu, Amazon Linux, and openSUSE all issuing advisories. German Linux security outlet pro-linux.de covered the issue in its security roundups. No notable researcher commentary or significant social media discussion beyond automated CVE feeds has been identified (Red Hat Advisory, SUSE Advisory, Ubuntu Advisory).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

pillow

Affected

sid

pillow: 12.2.0-1

Fixed

trixie

pillow: 11.1.0-5+deb13u3

Fixed

Ubuntu

Fixed

bionic (esm-infra)

pillow

Unknown

devel

pillow

Not Affected

focal (esm-apps)

pillow-python2

Unknown

focal (esm-infra)

pillow

Unknown

jammy

pillow: 9.0.1-1ubuntu0.4

Fixed

noble

pillow: 10.2.0-1ubuntu1.2

Fixed

questing

pillow: 11.3.0-1ubuntu1.3

Fixed

resolute

pillow: 12.1.1-2ubuntu1.2

Fixed

RHEL / CentOS

Affected

RHEL 8

python-pillow.src

Affected

RHEL 9

python3.9.src

Affected

RHEL 10

python3.12.src

Affected

Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-c978-59m8-c77vHIGH7.8
  • Python logoPython
  • virtualenv
NoYesOct 21, 2026
GHSA-cw65-gx24-rc82MEDIUM4.5
  • Python logoPython
  • virtualenv
NoYesOct 21, 2026
CVE-2026-113716MEDIUM4.5
  • Python logoPython
  • virtualenv
NoYesOct 21, 2026
GHSA-43mp-35q3-x3fqMEDIUM4.5
  • Python logoPython
  • virtualenv
NoYesOct 21, 2026
CVE-2026-113724MEDIUM4.5
  • Python logoPython
  • virtualenv
NoYesOct 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management