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

CVE-2026-34757: LIBPNG Use-After-Free Vulnerability

CVE-2026-34757 is a use-after-free vulnerability in LIBPNG affecting versions 1.0.9 to 1.6.56 that can lead to heap memory corruption and data leakage. This article covers technical details, affected versions, and mitigations.

Published: April 9, 2026

CVE-2026-34757 Overview

CVE-2026-34757 is a Use After Free vulnerability affecting libpng, the reference library for reading, creating, and manipulating PNG (Portable Network Graphics) raster image files. The vulnerability exists in versions 1.0.9 through 1.6.56 and occurs when a pointer obtained from png_get_PLTE, png_get_tRNS, or png_get_hIST is passed back into the corresponding setter function on the same png_struct/png_info pair.

Critical Impact

Exploitation of this vulnerability can lead to information disclosure through heap content leakage or silent data corruption in PNG chunk metadata, potentially affecting any application that processes PNG images using vulnerable libpng versions.

Affected Products

  • libpng versions 1.0.9 through 1.6.56
  • Applications using libpng for PNG image processing
  • Software libraries and frameworks depending on libpng

Discovery Timeline

  • April 9, 2026 - CVE-2026-34757 published to NVD
  • April 9, 2026 - Last updated in NVD database

Technical Details for CVE-2026-34757

Vulnerability Analysis

This Use After Free vulnerability (CWE-416) occurs in libpng's chunk metadata handling functions. The flaw is triggered when an application retrieves a pointer to internal buffer data using getter functions (png_get_PLTE, png_get_tRNS, or png_get_hIST) and subsequently passes that same pointer back to the corresponding setter function.

The vulnerability requires local access and no privileges to exploit. When triggered, the freed memory region may contain stale data resulting in silently corrupted chunk metadata, or it may contain data from subsequent heap allocations, leading to unrelated heap contents being leaked into the chunk structure. This creates both data integrity and confidentiality concerns for affected applications.

Root Cause

The root cause lies in the order of operations within the setter functions. When a setter is called, it frees the internal buffer before copying data from the caller-supplied pointer. If the caller-supplied pointer points to the same memory region that was just freed (because it was obtained from the getter), this creates a dangling pointer situation. The setter then reads from freed memory and copies potentially corrupted or unrelated data into the replacement buffer.

Attack Vector

The attack vector is local, requiring an attacker to influence how an application processes PNG files. An attacker could exploit this vulnerability by:

  1. Crafting a malicious PNG file that triggers specific getter-to-setter patterns in vulnerable applications
  2. Causing the application to read chunk data via getter functions
  3. Triggering the application to pass the retrieved pointer back to the setter
  4. Exploiting the resulting memory corruption for information disclosure or data manipulation

The fix introduces proper handling for self-referencing pointers in getter-to-setter aliasing scenarios:

c
    png_const_textp text_ptr, int num_text)
{
   int i;
+   png_textp old_text = NULL;

   png_debug1(1, "in text storage function, chunk typeid = 0x%lx",
      png_ptr == NULL ? 0xabadca11UL : (unsigned long)png_ptr->chunk_name);

Source: GitHub Commit

The patch adds a new test program to verify the fix:

text
set(pngstest_sources
    contrib/libtests/pngstest.c
)
+set(pnggetset_sources
+    contrib/libtests/pnggetset.c
+)
set(pngunknown_sources
    contrib/libtests/pngunknown.c
)

Source: GitHub Commit

Detection Methods for CVE-2026-34757

Indicators of Compromise

  • Unexpected memory access patterns in applications processing PNG files
  • Corrupted PNG chunk metadata in output files
  • Memory debugging tools (Valgrind, AddressSanitizer) reporting use-after-free errors during PNG processing
  • Anomalous heap behavior when applications call libpng getter/setter functions in sequence

Detection Strategies

  • Deploy memory sanitization tools (ASan, MSan) in development and testing environments to detect use-after-free conditions
  • Monitor applications using libpng for unusual memory access patterns or crashes during PNG processing
  • Implement static code analysis to identify patterns where getter results are passed directly to setters
  • Use SentinelOne's Singularity platform to detect memory corruption exploitation attempts

Monitoring Recommendations

  • Enable heap debugging and memory tracking for applications processing untrusted PNG files
  • Log and alert on crashes or exceptions in image processing pipelines
  • Monitor for applications making repeated calls to png_get_PLTE, png_get_tRNS, or png_get_hIST followed by corresponding setters

How to Mitigate CVE-2026-34757

Immediate Actions Required

  • Upgrade libpng to version 1.6.57 or later immediately
  • Audit application code for patterns that pass getter results directly to setters
  • Implement input validation for PNG files from untrusted sources
  • Consider sandboxing image processing operations until patches can be applied

Patch Information

The vulnerability is fixed in libpng version 1.6.57. The patch properly handles self-referencing pointers in getter-to-setter aliasing scenarios by preserving the old buffer reference before freeing. Detailed patch commits are available in the GitHub Security Advisory GHSA-6fr7-g8h7-v645.

Related issues and patches:

  • GitHub Issue #836
  • GitHub Issue #837

Workarounds

  • Avoid passing pointers obtained from png_get_PLTE, png_get_tRNS, or png_get_hIST directly back to their corresponding setters
  • Copy data from getter results to a separate buffer before passing to setter functions
  • Implement application-level bounds checking on PNG chunk operations
bash
# Verify installed libpng version
pkg-config --modversion libpng
# Expected output for patched version: 1.6.57 or higher

# Check for vulnerable library in linked applications
ldd /path/to/application | grep libpng

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechLibpng

  • SeverityMEDIUM

  • CVSS Score5.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-416
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Change

  • GitHub Issue #836

  • GitHub Issue #837

  • GitHub Security Advisory GHSA-6fr7-g8h7-v645
  • Related CVEs
  • CVE-2026-33416: LIBPNG Use-After-Free Vulnerability

  • CVE-2026-33636: LIBPNG Buffer Overflow Vulnerability

  • CVE-2026-3713: libpng Buffer Overflow Vulnerability

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