The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-42308

CVE-2026-42308: Python Pillow Buffer Overflow Vulnerability

CVE-2026-42308 is a buffer overflow flaw in Python Pillow caused by integer overflow in font glyph position tracking. This vulnerability affects versions prior to 12.2.0 and can be exploited through malformed fonts.

Published: May 18, 2026

CVE-2026-42308 Overview

CVE-2026-42308 is an integer overflow vulnerability [CWE-190] in Python Pillow, a widely used Python imaging library. The flaw exists in versions prior to 12.2.0 and occurs when Pillow tracks the current rendering position while processing fonts. If a font advances each glyph by an exceedingly large amount, the cumulative position calculation can overflow an integer. The Pillow maintainers patched this issue in version 12.2.0. The vulnerability requires local access and carries limited availability impact.

Critical Impact

An attacker who can supply a crafted font file to an application using Pillow can trigger an integer overflow during text rendering, potentially causing a denial of service in the affected process.

Affected Products

  • Python Pillow versions prior to 12.2.0
  • Applications embedding Pillow for image and text rendering
  • Python services that process untrusted font files via Pillow

Discovery Timeline

  • 2026-05-09 - CVE-2026-42308 published to the National Vulnerability Database
  • 2026-05-12 - Last updated in NVD database

Technical Details for CVE-2026-42308

Vulnerability Analysis

The vulnerability resides in the text rendering path of Pillow. When Pillow draws text, it iterates over glyphs in a font and advances a running position value for each glyph. The library uses a fixed-width integer to store this position. A font that declares very large per-glyph advance values causes the cumulative sum to exceed the maximum representable integer value.

When the overflow occurs, the position wraps around to a small or negative value. This breaks subsequent length and offset calculations that depend on the position variable. The resulting state can cause incorrect memory allocations, abnormal rendering, or process termination. The advisory tracked under GHSA-wjx4-4jcj-g98j confirms that the flaw is reachable through font input alone.

Root Cause

The root cause is missing bounds validation on cumulative glyph advance values. Pillow trusts the font metrics it parses without checking whether successive additions would exceed integer range. This is a classic instance of [CWE-190] Integer Overflow or Wraparound.

Attack Vector

The attack vector is local. An attacker must supply a malicious font file to an application that calls Pillow to render text with that font. Common exposure scenarios include image generation pipelines that accept user-supplied fonts, document conversion tools, and CAPTCHA or thumbnail services. No authentication or user interaction beyond loading the font is required. See the GitHub Security Advisory GHSA-wjx4-4jcj-g98j for technical details.

Detection Methods for CVE-2026-42308

Indicators of Compromise

  • Unexpected crashes or OverflowError exceptions in Python processes that invoke Pillow text rendering functions.
  • Presence of font files (.ttf, .otf, .woff) in user-writable directories consumed by Pillow workflows.
  • Anomalous resource usage or termination of image-processing worker processes following ingestion of third-party fonts.

Detection Strategies

  • Inventory all Python environments and identify installations of Pillow below version 12.2.0 using pip list or software composition analysis tooling.
  • Review application code paths that pass externally sourced font files to ImageFont.truetype() or related Pillow APIs.
  • Inspect logs of image-processing services for repeated worker restarts correlated with font-rendering operations.

Monitoring Recommendations

  • Track Pillow version pins across CI/CD pipelines and container images to surface vulnerable releases.
  • Monitor process exit codes and stack traces from services that perform text-on-image rendering for untrusted inputs.
  • Subscribe to the python-pillow GitHub security advisories feed for follow-up fixes.

How to Mitigate CVE-2026-42308

Immediate Actions Required

  • Upgrade Pillow to version 12.2.0 or later in all production, staging, and development environments.
  • Audit application code to reject or validate user-supplied font files before passing them to Pillow.
  • Rebuild and redeploy container images that bundle Pillow to incorporate the patched release.

Patch Information

The issue is fixed in Pillow Release 12.2.0. Refer to the GitHub Security Advisory GHSA-wjx4-4jcj-g98j for the official fix details and commit references.

Workarounds

  • Restrict Pillow workflows to a curated allowlist of trusted font files until the upgrade is deployed.
  • Run image-rendering workers under strict resource limits and isolation so that a crash cannot affect other tenants.
  • Sanitize or strip font metadata from uploaded files using a separate, hardened font parser before invoking Pillow.
bash
# Upgrade Pillow to the patched release
pip install --upgrade "Pillow>=12.2.0"

# Verify the installed version
python -c "import PIL; print(PIL.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechPython Pillow

  • SeverityMEDIUM

  • CVSS Score5.1

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-190
  • Technical References
  • Pillow Release 12.2.0
  • Vendor Resources
  • GitHub Security Advisory GHSA-wjx4-4jcj-g98j
  • Related CVEs
  • CVE-2026-42309: Python Pillow Buffer Overflow Vulnerability

  • CVE-2024-28219: Python Pillow Buffer Overflow Vulnerability

  • CVE-2025-48379: Python Pillow Buffer Overflow Vulnerability

  • CVE-2022-22816: Python Pillow Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English