CVE-2025-28164

5.5 MEDIUM

📋 TL;DR

A buffer overflow vulnerability in libpng versions 1.6.43 through 1.6.46 allows local attackers to cause denial of service by exploiting the png_create_read_struct() function. This affects any application or system using these vulnerable libpng versions to process PNG images. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • libpng
  • Applications using libpng library
Versions: 1.6.43 through 1.6.46
Operating Systems: Linux, Windows, macOS, BSD, Any OS using affected libpng
Default Config Vulnerable: ⚠️ Yes
Notes: Any application that uses libpng to process PNG images is potentially vulnerable if using affected versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system crash or application termination leading to denial of service, potentially disrupting services that rely on PNG image processing.

🟠

Likely Case

Application crash when processing malicious PNG files, causing temporary service disruption for affected applications.

🟢

If Mitigated

Minimal impact with proper input validation and sandboxing of image processing components.

🌐 Internet-Facing: LOW - Requires local access to exploit, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local attackers or malicious users could disrupt services by providing malicious PNG files to vulnerable applications.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Proof of concept available in GitHub references. Requires local access to provide malicious PNG file to vulnerable application.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libpng 1.6.47 or later

Vendor Advisory: https://github.com/pnggroup/libpng/issues/655

Restart Required: Yes

Instructions:

1. Update libpng to version 1.6.47 or later. 2. For Linux: Use package manager (apt-get update && apt-get upgrade libpng, yum update libpng, etc.). 3. For Windows: Download updated version from libpng.org. 4. Recompile applications using libpng if statically linked. 5. Restart affected services.

🔧 Temporary Workarounds

Input validation for PNG files

all

Implement strict validation of PNG files before processing with libpng

Sandbox image processing

all

Run PNG processing in isolated containers or sandboxes to limit impact

🧯 If You Can't Patch

  • Implement strict file upload controls to prevent malicious PNG files
  • Monitor for application crashes related to PNG processing and investigate anomalies

🔍 How to Verify

Check if Vulnerable:

Check libpng version: pngcrush -version or check package manager. Look for versions 1.6.43-1.6.46.

Check Version:

pngcrush -version 2>&1 | grep libpng || dpkg -l | grep libpng || rpm -qa | grep libpng

Verify Fix Applied:

Verify libpng version is 1.6.47 or later. Test with known vulnerable PNG files to ensure no crash.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing PNG files
  • Segmentation faults in libpng-related processes
  • Unexpected termination of image processing services

Network Indicators:

  • Unusual PNG file uploads to applications
  • Multiple failed PNG processing attempts

SIEM Query:

source="application_logs" AND ("segmentation fault" OR "SIGSEGV") AND "libpng"

🔗 References

📤 Share & Export