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
    • 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-2025-48379

CVE-2025-48379: Python Pillow Buffer Overflow Vulnerability

CVE-2025-48379 is a heap buffer overflow flaw in Python Pillow that occurs when saving large DDS format images. This vulnerability affects users saving untrusted data. This article covers technical details, affected versions, impact, and mitigation strategies.

Updated: January 22, 2026

CVE-2025-48379 Overview

CVE-2025-48379 is a heap buffer overflow vulnerability affecting Python Pillow, a widely-used Python imaging library. The vulnerability exists in versions 11.2.0 through 11.2.x when writing sufficiently large images (greater than 64KB when encoded with default settings) in the DDS (DirectDraw Surface) format. The flaw occurs due to writing into a buffer without properly checking for available space, potentially leading to memory corruption.

Critical Impact

This heap buffer overflow vulnerability can lead to integrity compromise when processing untrusted image data through the DDS format encoder. Applications that allow users to save arbitrary image data as compressed DDS files are at risk.

Affected Products

  • Python Pillow versions 11.2.0 to 11.2.x
  • Applications using Pillow's DDS image encoding functionality
  • Systems processing untrusted image data with DDS compression

Discovery Timeline

  • 2025-07-01 - CVE-2025-48379 published to NVD
  • 2025-10-15 - Last updated in NVD database

Technical Details for CVE-2025-48379

Vulnerability Analysis

This vulnerability is classified as CWE-122 (Heap-based Buffer Overflow). The issue manifests when the Pillow library attempts to write large image data to the DDS format. When an image exceeds 64KB in size with default encoding settings, the DDS encoder writes data into a heap-allocated buffer without performing adequate bounds checking. This lack of validation allows data to be written beyond the allocated buffer boundaries, resulting in heap memory corruption.

The vulnerability specifically affects the write path for DDS image compression. The local attack vector requires an attacker to have the ability to influence image data that gets processed through the vulnerable encoding function. This could occur in scenarios where applications accept user-uploaded images and convert them to DDS format for storage or distribution.

Root Cause

The root cause of this vulnerability lies in insufficient buffer size validation within the DDS image encoder implementation. When processing large images, the encoder allocates a buffer based on initial size estimates but fails to verify that sufficient space remains before each write operation. This oversight allows the write operation to overflow the heap buffer when handling images that exceed the expected size threshold of approximately 64KB.

Attack Vector

The attack vector for CVE-2025-48379 requires local access and involves manipulating image data that is subsequently processed by an application using the vulnerable Pillow library. An attacker would need to:

  1. Craft or provide a sufficiently large image (greater than 64KB encoded)
  2. Trigger the application to save this image in DDS format using Pillow's encoding functionality
  3. The heap buffer overflow occurs during the write operation

The vulnerability's impact is limited to integrity (no confidentiality or availability impact according to the CVSS vector), meaning the primary concern is memory corruption rather than data disclosure or service disruption. The overflow condition occurs specifically when untrusted data is saved as a compressed DDS image.

Detection Methods for CVE-2025-48379

Indicators of Compromise

  • Unexpected application crashes or segmentation faults when processing DDS image exports
  • Memory corruption errors in Python applications using Pillow for image conversion
  • Anomalous heap memory allocation patterns in image processing workflows
  • Application instability specifically during DDS format encoding operations

Detection Strategies

  • Monitor Python applications for heap corruption indicators when Pillow DDS encoding is in use
  • Implement application-level logging for image format conversions exceeding 64KB
  • Utilize memory safety tools (AddressSanitizer, Valgrind) during development and testing to detect buffer overflows
  • Review application dependencies for Pillow versions between 11.2.0 and 11.2.x

Monitoring Recommendations

  • Audit Python package dependencies across environments to identify vulnerable Pillow installations
  • Implement automated vulnerability scanning for Python packages in CI/CD pipelines
  • Monitor application logs for unusual behavior during image processing operations
  • Enable heap memory protections and crash reporting for applications processing user-provided images

How to Mitigate CVE-2025-48379

Immediate Actions Required

  • Upgrade Python Pillow to version 11.3.0 or later immediately
  • Audit applications to identify any DDS image encoding functionality that processes untrusted data
  • Implement input validation to restrict image sizes before DDS encoding if immediate upgrade is not possible
  • Review deployment configurations to ensure all environments use the patched Pillow version

Patch Information

The vulnerability has been patched in Pillow version 11.3.0. The fix is available in commit ef98b3510e3e4f14b547762764813d7e5ca3c5a4 and was implemented via GitHub Pull Request #9041. Users should upgrade to the patched version by updating their Python package dependencies.

For detailed information about the security fix, refer to:

  • GitHub Security Advisory GHSA-xg8h-j46f-w952
  • Pillow Release Notes 11.3.0

Workarounds

  • Avoid saving untrusted image data in DDS format until the upgrade can be completed
  • Implement strict image size validation before passing data to Pillow's DDS encoder
  • Use alternative image formats (PNG, JPEG) for untrusted data processing workflows
  • Apply application-level restrictions to prevent DDS format encoding for user-supplied images
bash
# Upgrade Pillow to the patched version
pip install --upgrade Pillow>=11.3.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.5

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-122
  • Technical References
  • GitHub Pull Request #9041

  • GitHub Pillow Release Notes 11.3.0
  • Vendor Resources
  • GitHub Pillow Commit Update

  • GitHub Security Advisory GHSA-xg8h-j46f-w952
  • Related CVEs
  • CVE-2024-28219: Python Pillow Buffer Overflow Vulnerability

  • CVE-2022-22816: Python Pillow Buffer Overflow Vulnerability

  • CVE-2021-34552: Python Pillow Buffer Overflow Vulnerability

  • CVE-2021-25289: Python Pillow Buffer Overflow Vulnerability
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