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

CVE-2025-64720: Libpng Buffer Overflow Vulnerability

CVE-2025-64720 is a buffer overflow flaw in Libpng affecting versions 1.6.0 to 1.6.50. The vulnerability allows out-of-bounds reads when processing palette images. This article covers technical details, affected versions, and patches.

Published: March 11, 2026

CVE-2025-64720 Overview

CVE-2025-64720 is an out-of-bounds read vulnerability in libpng, the reference library for reading, creating, and manipulating PNG (Portable Network Graphics) raster image files. The vulnerability exists in the png_image_read_composite function when processing palette images with PNG_FLAG_OPTIMIZE_ALPHA enabled. The palette compositing code in png_init_read_transformations incorrectly applies background compositing during premultiplication, violating the invariant component ≤ alpha × 257 required by the simplified PNG API.

Critical Impact

Network-accessible out-of-bounds read vulnerability that can lead to information disclosure and application crashes when processing maliciously crafted PNG images.

Affected Products

  • libpng versions 1.6.0 to 1.6.50
  • Applications using libpng for PNG image processing
  • Systems with vulnerable libpng library installations

Discovery Timeline

  • 2025-11-25 - CVE-2025-64720 published to NVD
  • 2025-11-26 - Last updated in NVD database

Technical Details for CVE-2025-64720

Vulnerability Analysis

This out-of-bounds read vulnerability (CWE-125) occurs within the PNG image processing pipeline when certain optimization flags are enabled. The core issue lies in how the library handles palette-based images with alpha channel optimization. When PNG_FLAG_OPTIMIZE_ALPHA is set, the png_init_read_transformations function performs premultiplication operations that can violate expected bounds constraints.

The simplified PNG API requires that color component values maintain a specific invariant relationship with alpha values (component ≤ alpha × 257). However, the vulnerable code path incorrectly applies background compositing during the premultiplication process, causing this invariant to be violated. This can result in out-of-bounds memory access when the library attempts to read palette data beyond allocated buffer boundaries.

Root Cause

The root cause stems from incorrect logic in the palette compositing code within png_init_read_transformations. When processing transparent palette entries (where trans_alpha[i] != 0xff), the original code performed background compositing using png_composite() even when only premultiplication should occur. This mixing of operations corrupted the expected relationship between color components and alpha values, leading to invalid array index calculations in subsequent processing steps.

Attack Vector

An attacker can exploit this vulnerability by crafting a malicious PNG image with specific palette and transparency configurations. When a vulnerable application processes this image using libpng with PNG_FLAG_OPTIMIZE_ALPHA enabled, the out-of-bounds read is triggered. The attack is network-accessible, meaning malicious images can be delivered via web pages, email attachments, or other network-based delivery mechanisms. User interaction is required as the victim must open or view the malicious image.

c
// Security patch in pngrtran.c - Fix a buffer overflow in `png_init_read_transformations`
// Source: https://github.com/pnggroup/libpng/commit/08da33b4c88cfcd36e5a706558a8d7e0e4773643

                   }
                   else /* if (png_ptr->trans_alpha[i] != 0xff) */
                   {
-                     png_byte v, w;
-
-                     v = png_ptr->gamma_to_1[palette[i].red];
-                     png_composite(w, v, png_ptr->trans_alpha[i], back_1.red);
-                     palette[i].red = png_ptr->gamma_from_1[w];
-
-                     v = png_ptr->gamma_to_1[palette[i].green];
-                     png_composite(w, v, png_ptr->trans_alpha[i], back_1.green);
-                     palette[i].green = png_ptr->gamma_from_1[w];
-
-                     v = png_ptr->gamma_to_1[palette[i].blue];
-                     png_composite(w, v, png_ptr->trans_alpha[i], back_1.blue);
-                     palette[i].blue = png_ptr->gamma_from_1[w];
+                     if ((png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0)
+                     {
+                        /* Premultiply only:
+                         * component = round((component * alpha) / 255)
+                         */
+                        png_uint_32 component;
+
+                        component = png_ptr->gamma_to_1[palette[i].red];
+                        component =
+                            (component * png_ptr->trans_alpha[i] + 128) / 255;
+                        palette[i].red = png_ptr->gamma_from_1[component];
+
+                        component = png_ptr->gamma_to_1[palette[i].green];
+                        component =

Detection Methods for CVE-2025-64720

Indicators of Compromise

  • Unexpected application crashes when processing PNG images with palette-based transparency
  • Memory access violations or segmentation faults in processes using libpng
  • Anomalous read operations in memory regions adjacent to PNG palette buffers
  • Application logs showing errors related to PNG image decoding with alpha optimization

Detection Strategies

  • Monitor for crashes in applications that process PNG images, particularly those using the simplified API
  • Implement file integrity monitoring for libpng library files to detect outdated versions
  • Use memory sanitization tools (ASan, MSan) in development environments to detect out-of-bounds reads
  • Deploy intrusion detection rules to identify malformed PNG files with suspicious palette configurations

Monitoring Recommendations

  • Enable verbose logging in image processing applications to capture PNG decoding errors
  • Monitor system crash reports for patterns indicating libpng-related memory violations
  • Track libpng version inventory across infrastructure to identify vulnerable deployments
  • Implement automated vulnerability scanning for libpng versions between 1.6.0 and 1.6.50

How to Mitigate CVE-2025-64720

Immediate Actions Required

  • Upgrade libpng to version 1.6.51 or later immediately
  • Audit systems and applications to identify all instances of vulnerable libpng versions
  • Consider temporarily disabling PNG_FLAG_OPTIMIZE_ALPHA if immediate patching is not possible
  • Prioritize patching on systems that process untrusted PNG images from external sources

Patch Information

The vulnerability has been patched in libpng version 1.6.51. The fix modifies the palette compositing logic in png_init_read_transformations to correctly handle premultiplication when PNG_FLAG_OPTIMIZE_ALPHA is enabled, without incorrectly applying background compositing. The patch ensures that the invariant component ≤ alpha × 257 is maintained throughout the processing pipeline.

For detailed patch information, refer to:

  • GitHub Commit 08da33b4c88cfcd36e5a706558a8d7e0e4773643
  • GitHub Pull Request #751
  • GitHub Security Advisory GHSA-hfc7-ph9c-wcww

Workarounds

  • Disable PNG_FLAG_OPTIMIZE_ALPHA flag in applications where immediate patching is not feasible
  • Implement input validation to reject PNG images with suspicious palette configurations
  • Use sandboxing or containerization to isolate PNG image processing from critical systems
  • Deploy web application firewalls with rules to inspect uploaded PNG files for malformed structures
bash
# Configuration example - Check libpng version and update on Debian/Ubuntu systems
# Check current libpng version
pkg-config --modversion libpng

# Update libpng to patched version
sudo apt update && sudo apt upgrade libpng16-16

# Verify the update
dpkg -l | grep libpng

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechLibpng

  • SeverityHIGH

  • CVSS Score7.1

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-125
  • Technical References
  • GitHub Issue #686 for libpng
  • Vendor Resources
  • GitHub Commit for libpng

  • GitHub PR #751 for libpng

  • GitHub Security Advisory GHSA-hfc7-ph9c-wcww
  • Related CVEs
  • CVE-2026-33636: LIBPNG Buffer Overflow Vulnerability

  • CVE-2026-3713: libpng Buffer Overflow Vulnerability

  • CVE-2026-25646: LIBPNG Buffer Overflow Vulnerability

  • CVE-2026-22695: LIBPNG 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