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-65018

CVE-2025-65018: Libpng Buffer Overflow Vulnerability

CVE-2025-65018 is a heap buffer overflow vulnerability in Libpng affecting versions 1.6.0 to 1.6.50. Attackers can exploit interlaced PNG files to write beyond buffer bounds. This article covers technical details, impact, and mitigation.

Published: April 1, 2026

CVE-2025-65018 Overview

CVE-2025-65018 is a heap buffer overflow vulnerability in the libpng library, the reference implementation for reading, creating, and manipulating PNG (Portable Network Graphics) raster image files. The vulnerability exists in the simplified API function png_image_finish_read when processing 16-bit interlaced PNG images with 8-bit output format. Attacker-crafted interlaced PNG files can cause heap writes beyond allocated buffer bounds, potentially leading to memory corruption and application crashes.

Critical Impact

Maliciously crafted PNG files can trigger heap buffer overflow conditions, enabling attackers to corrupt memory and potentially achieve code execution or cause denial of service in applications using vulnerable libpng versions.

Affected Products

  • libpng versions 1.6.0 to before 1.6.51
  • Applications and software packages that bundle or dynamically link to vulnerable libpng versions
  • Image processing tools and libraries utilizing the libpng simplified API

Discovery Timeline

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

Technical Details for CVE-2025-65018

Vulnerability Analysis

This heap buffer overflow vulnerability (CWE-122) occurs in the png_image_finish_read function within libpng's simplified API. The vulnerability is triggered when an application attempts to read a 16-bit interlaced PNG image while specifying an 8-bit output format. Due to improper validation of the bit depth mismatch between the source PNG and the requested output format, the library performs heap writes that exceed the bounds of the allocated output buffer.

The vulnerability requires user interaction—specifically, an attacker must convince a victim to open or process a maliciously crafted PNG file. Once triggered, the heap corruption can lead to application crashes, denial of service, or potentially more severe consequences depending on the application's memory layout and usage patterns.

Root Cause

The root cause is a missing validation check for bit depth compatibility between the source PNG file's color depth and the application's requested output format. When a 16-bit interlaced PNG is processed with an 8-bit output format request, the buffer size calculations assume 8-bit output while the actual write operations process 16-bit data, resulting in writes beyond the allocated buffer boundaries.

Attack Vector

The attack requires local access where an attacker must deliver a specially crafted PNG file to the target system. The victim must then open or process this file using an application that utilizes vulnerable libpng versions with the simplified API. The attacker crafts an interlaced PNG with 16-bit color depth that triggers the buffer overflow when the application processes it with an 8-bit output format specification.

c
                   int result;
                   png_image_read_control display;
 
+                  /* Reject bit depth mismatches to avoid buffer overflows. */
+                  png_uint_32 ihdr_bit_depth =
+                      image->opaque->png_ptr->bit_depth;
+                  int requested_linear =
+                      (image->format & PNG_FORMAT_FLAG_LINEAR) != 0;
+                  if (ihdr_bit_depth == 16 && !requested_linear)
+                     return png_image_error(image,
+                         "png_image_finish_read: "
+                         "16-bit PNG must use 16-bit output format");
+                  if (ihdr_bit_depth < 16 && requested_linear)
+                     return png_image_error(image,
+                         "png_image_finish_read: "
+                         "8-bit PNG must not use 16-bit output format");
+
                   memset(&display, 0, (sizeof display));
                   display.image = image;
                   display.buffer = buffer;

Source: GitHub libpng Commit

Detection Methods for CVE-2025-65018

Indicators of Compromise

  • Unexpected application crashes when processing PNG image files
  • Memory corruption errors or heap-related exceptions in image processing applications
  • Anomalous PNG files with 16-bit color depth and interlaced encoding in unexpected locations
  • Core dumps or crash logs indicating heap overflow in libpng-related functions

Detection Strategies

  • Monitor for application crashes that reference png_image_finish_read or related libpng functions in stack traces
  • Implement file integrity monitoring to detect suspicious PNG files with unusual characteristics
  • Deploy memory protection tools such as AddressSanitizer (ASan) in development and testing environments to detect heap overflows
  • Use static analysis tools to identify applications using vulnerable libpng versions

Monitoring Recommendations

  • Enable crash reporting and analysis for applications that process PNG images
  • Implement logging for image processing operations to track file sources and processing outcomes
  • Monitor system logs for memory-related errors in applications using libpng
  • Establish baseline behavior for image processing applications to detect anomalous activity

How to Mitigate CVE-2025-65018

Immediate Actions Required

  • Update libpng to version 1.6.51 or later immediately
  • Audit all applications and systems to identify those using vulnerable libpng versions (1.6.0 to before 1.6.51)
  • Review dependencies and software packages that may bundle libpng internally
  • Consider restricting the processing of untrusted PNG files until patches are applied

Patch Information

The vulnerability has been patched in libpng version 1.6.51. The fix introduces explicit validation checks in png_image_finish_read to reject bit depth mismatches that would result in buffer overflows. Two commits address this issue: the initial fix adds validation logic, and a subsequent commit rearchitects the fix for improved handling of interlaced 16-to-8 bit depth conversions. For complete details, refer to the GitHub Security Advisory GHSA-7wv6-48j4-hj3g.

Workarounds

  • Avoid processing untrusted or unknown PNG files with applications using vulnerable libpng versions
  • Ensure 16-bit PNG images are processed with 16-bit output formats (use PNG_FORMAT_FLAG_LINEAR)
  • Implement input validation to reject or quarantine PNG files from untrusted sources
  • Consider using sandboxed environments for image processing operations until patches are applied
bash
# Verify libpng version on Linux systems
pkg-config --modversion libpng

# Check for vulnerable versions and update via package manager
# Debian/Ubuntu
apt update && apt upgrade libpng16-16

# RHEL/CentOS/Fedora
dnf update libpng

# Verify updated version
pkg-config --modversion 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.10%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-122
  • Technical References
  • GitHub libpng Issue Discussion

  • GitHub libpng Pull Request
  • Vendor Resources
  • GitHub libpng Commit Update

  • GitHub libpng Commit Update

  • GitHub Security Advisory GHSA-7wv6-48j4-hj3g
  • 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