CVE-2025-66293

7.1 HIGH

📋 TL;DR

CVE-2025-66293 is an out-of-bounds read vulnerability in libpng's simplified API that allows reading up to 1012 bytes beyond allocated memory when processing valid PNG images with specific characteristics. This affects applications using libpng versions prior to 1.6.52 to process PNG files, potentially exposing sensitive memory contents. The vulnerability is triggered by valid PNG files per specification, making detection difficult.

💻 Affected Systems

Products:
  • libpng
  • Applications using libpng library
Versions: libpng versions prior to 1.6.52
Operating Systems: All operating systems using vulnerable libpng versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects simplified API usage with palette PNG images containing partial transparency and gamma correction.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Information disclosure of up to 1012 bytes of adjacent heap memory, potentially exposing sensitive data like passwords, keys, or application state.

🟠

Likely Case

Application crash or denial of service due to invalid memory access, with possible limited information leakage.

🟢

If Mitigated

Minimal impact with proper memory isolation and ASLR, though some information disclosure may still occur.

🌐 Internet-Facing: MEDIUM - PNG processing is common in web applications and image uploads, but exploitation requires specific PNG characteristics.
🏢 Internal Only: LOW - Requires processing malicious PNG files, which is less likely in controlled internal environments.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting specific PNG files that trigger the out-of-bounds read condition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libpng 1.6.52

Vendor Advisory: https://github.com/pnggroup/libpng/security/advisories/GHSA-9mpm-9pxh-mg4f

Restart Required: Yes

Instructions:

1. Download libpng 1.6.52 or later from official sources. 2. Compile and install the updated library. 3. Recompile any applications using libpng against the new version. 4. Restart affected services and applications.

🔧 Temporary Workarounds

Disable simplified API

all

Avoid using libpng's simplified API functions that trigger this vulnerability

Input validation

all

Reject PNG files with palette color type and partial transparency before processing

🧯 If You Can't Patch

  • Implement strict input validation to reject suspicious PNG files
  • Isolate PNG processing in sandboxed environments with limited memory access

🔍 How to Verify

Check if Vulnerable:

Check libpng version with 'pngcrush -version' or examine library files for version strings

Check Version:

pngcrush -version 2>&1 | grep -i libpng

Verify Fix Applied:

Verify installed libpng version is 1.6.52 or higher using version checking commands

📡 Detection & Monitoring

Log Indicators:

  • Application crashes during PNG processing
  • Memory access violation errors
  • Unexpected termination of image processing services

Network Indicators:

  • Multiple PNG upload attempts with specific characteristics
  • Unusual PNG file sizes or structures

SIEM Query:

source="application_logs" AND ("segmentation fault" OR "access violation" OR "libpng") AND "png"

🔗 References

📤 Share & Export