CVE-2025-64505
Linux Debian vulnerability analysis and mitigation

Overview

CVE-2025-64505 is a heap buffer over-read vulnerability discovered in LIBPNG, a reference library for handling PNG (Portable Network Graphics) image files. The vulnerability affects versions prior to 1.6.51 and was discovered through fuzzing and security research. The issue exists in libpng's pngdoquantize function when processing PNG files with malformed palette indices (GitHub Advisory, Debian Tracker).

Technical details

The vulnerability occurs when palettelookup array bounds are not validated against externally-supplied image data in the pngdoquantize function. The pngsetquantize function allocates the quantizeindex array based on numpalette from the PNG file, but pngdoquantize trusts external pixel data as valid indices without validation. When numpalette is small (e.g., 4) but pixel data contains indices up to 255, this results in reading up to 251 bytes beyond the allocated buffer. The vulnerability has been assigned a CVSS score of 6.1 (Moderate) with vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H (GitHub Advisory).

Impact

The vulnerability can lead to information disclosure through heap memory leakage and denial of service through application crashes. The exploitation requires user interaction in the form of processing a maliciously crafted PNG file (OpenWall).

Mitigation and workarounds

The vulnerability has been fixed in libpng version 1.6.51. The fix involves allocating the quantizeindex array to PNGMAXPALETTELENGTH (256 bytes) instead of numpalette bytes, matching the allocation pattern for palette[], transalpha[], and riffled_palette[]. This prevents buffer overflows from malformed PNG files with out-of-range palette indices. Users are advised to upgrade to libpng 1.6.51 immediately (OpenWall).

Additional resources


SourceThis report was generated using AI

Related Linux Debian vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65018HIGH7.1
  • Linux DebianLinux Debian
  • media-libs/libpng
NoYesNov 25, 2025
CVE-2025-64720HIGH7.1
  • Linux DebianLinux Debian
  • libpng1.6
NoYesNov 25, 2025
CVE-2025-59820MEDIUM6.7
  • Linux DebianLinux Debian
  • krita
NoYesNov 26, 2025
CVE-2025-64506MEDIUM6.1
  • Linux DebianLinux Debian
  • libpng
NoYesNov 25, 2025
CVE-2025-64505MEDIUM6.1
  • Linux DebianLinux Debian
  • libpng1.6
NoYesNov 25, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management