Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-40192

CVE-2026-40192: Pillow FITS DoS Vulnerability

CVE-2026-40192 is a denial of service flaw in Pillow's FITS image decoder that enables decompression bomb attacks causing unbounded memory consumption. This article covers technical details, affected versions, and mitigations.

Published: April 17, 2026

CVE-2026-40192 Overview

CVE-2026-40192 is a resource exhaustion vulnerability in Pillow, the popular Python imaging library. Versions 10.3.0 through 12.1.1 failed to limit the amount of GZIP-compressed data read when decoding FITS (Flexible Image Transport System) image files, making them susceptible to decompression bomb attacks. An attacker can craft a malicious FITS file that, when processed by Pillow, causes unbounded memory consumption resulting in denial of service through an out-of-memory crash or severe performance degradation.

Critical Impact

Processing a specially crafted FITS image file can cause complete denial of service through memory exhaustion, potentially crashing applications and services that process user-supplied images using Pillow.

Affected Products

  • Pillow versions 10.3.0 through 12.1.1
  • Python applications using Pillow for FITS image processing
  • Web applications and services accepting user-uploaded FITS images

Discovery Timeline

  • April 15, 2026 - CVE CVE-2026-40192 published to NVD
  • April 15, 2026 - Last updated in NVD database

Technical Details for CVE-2026-40192

Vulnerability Analysis

This vulnerability is classified as CWE-400 (Uncontrolled Resource Consumption). The flaw exists in Pillow's FITS image decoder, specifically in the FitsImagePlugin.py module. When processing GZIP-compressed FITS images, the vulnerable code path decompresses the entire compressed stream into memory without any size limits. This design flaw allows an attacker to craft a small compressed file that expands to an enormous size when decompressed, overwhelming system memory.

The vulnerability is network-exploitable since FITS images are commonly uploaded to web applications and image processing services. No authentication or user interaction is required to trigger the vulnerability—simply submitting a malicious FITS file to a vulnerable application is sufficient.

Root Cause

The root cause lies in the decode method of the FITS image decoder. The original implementation called gzip.decompress(self.fd.read()), which reads and decompresses the entire GZIP stream without bounds checking. This allows a small compressed payload to expand to gigabytes of data, exceeding available memory and causing denial of service.

Attack Vector

An attacker can exploit this vulnerability by submitting a specially crafted FITS file to any application using vulnerable Pillow versions for image processing. The attack requires no authentication and works via network delivery. Typical attack scenarios include:

  1. Uploading a malicious FITS image to a web application that processes user images
  2. Sending a FITS file as an email attachment to trigger processing by an automated system
  3. Hosting a malicious FITS file that gets fetched and processed by a vulnerable crawler or service

Security Patch (src/PIL/FitsImagePlugin.py):

python
 
     def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]:
         assert self.fd is not None
-        value = gzip.decompress(self.fd.read())
-
-        rows = []
-        offset = 0
-        number_of_bits = min(self.args[0] // 8, 4)
-        for y in range(self.state.ysize):
-            row = bytearray()
-            for x in range(self.state.xsize):
-                row += value[offset + (4 - number_of_bits) : offset + 4]
-                offset += 4
-            rows.append(row)
+        with gzip.open(self.fd) as fp:
+            value = fp.read(self.state.xsize * self.state.ysize * 4)
+
+            rows = []
+            offset = 0
+            number_of_bits = min(self.args[0] // 8, 4)
+            for y in range(self.state.ysize):
+                row = bytearray()
+                for x in range(self.state.xsize):
+                    row += value[offset + (4 - number_of_bits) : offset + 4]
+                    offset += 4
+                rows.append(row)
         self.set_as_raw(bytes([pixel for row in rows[::-1] for pixel in row])
         return -1, 0
 

Source: GitHub Commit Reference

The fix replaces unbounded decompression with a bounded read that only extracts the exact amount of data needed based on image dimensions (self.state.xsize * self.state.ysize * 4), preventing decompression bombs from consuming excessive memory.

Detection Methods for CVE-2026-40192

Indicators of Compromise

  • Sudden spikes in memory consumption on servers processing image uploads
  • Application crashes with out-of-memory errors during FITS file processing
  • Unusually small FITS files (high compression ratio) in upload queues or logs
  • Process terminations with OOM killer events in system logs

Detection Strategies

  • Monitor memory usage patterns for image processing services and set alerts for anomalous consumption
  • Implement file type validation that checks FITS file headers before processing
  • Deploy application-level logging to track FITS image processing operations
  • Use dependency scanning tools to identify Pillow versions 10.3.0 through 12.1.1 in your codebase

Monitoring Recommendations

  • Configure memory limits and resource quotas for image processing containers and services
  • Implement health checks that detect memory exhaustion conditions
  • Set up automated alerts for Python application crashes related to memory errors
  • Monitor system logs for OOM killer activity targeting Pillow-dependent services

How to Mitigate CVE-2026-40192

Immediate Actions Required

  • Upgrade Pillow to version 12.2.0 or later immediately
  • Audit all applications and services that process user-supplied images for vulnerable Pillow versions
  • Implement input validation to reject or quarantine FITS files until patching is complete
  • Configure memory limits for image processing workers to contain potential impact

Patch Information

The vulnerability is fixed in Pillow version 12.2.0. The patch modifies the FITS decoder to read only the required amount of decompressed data based on image dimensions, preventing unbounded memory consumption. For detailed patch information, see the GitHub Pull Request and Pillow Release Notes.

Additional technical details are available in the GitHub Security Advisory.

Workarounds

  • Restrict image processing to specific formats excluding FITS until upgrade is possible
  • Implement a whitelist of allowed image formats: Image.open(fp, formats=["PNG", "JPEG", "GIF"])
  • Deploy resource limits (memory cgroups, container limits) to contain denial of service impact
  • Pre-validate uploaded files and reject FITS format until patched
bash
# Configuration example - Upgrade Pillow to patched version
pip install --upgrade "Pillow>=12.2.0"

# Verify 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
  • TypeDOS

  • Vendor/TechPillow

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/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
  • AvailabilityHigh
  • CWE References
  • CWE-400
  • Technical References
  • GitHub Commit Reference

  • GitHub Pull Request

  • GitHub Security Advisory

  • Pillow Release Notes
  • Related CVEs
  • CVE-2026-25990: 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