CVE-2025-64506: LIBPNG is vulnerable to a heap buffer over-read in `png_write_image_8bit` with grayscale+alpha or RGB/RGBA images
LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. From version 1.6.0 to before 1.6.51, a heap buffer over-read vulnerability exists in libpng's pngwriteimage8bit function when processing 8-bit images through the simplified write API with convertto8bit enabled. The vulnerability affects 8-bit grayscale+alpha, RGB/RGBA, and images with incomplete row data. A conditional guard incorrectly allows 8-bit input to enter code expecting 16-bit input, causing reads up to 2 bytes beyond allocated buffer boundaries. This issue has been patched in version 1.6.51.
Other sources
LIBPNG is vulnerable to a heap buffer over-read in pngwriteimage8bit with grayscale+alpha or RGB/RGBA images
— Microsoft
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-64506?
CVE-2025-64506 is classified as a high severity vulnerability due to its potential to cause a heap buffer over-read.
How do I fix CVE-2025-64506?
To fix CVE-2025-64506, upgrade LibPNG to version 1.6.51 or later where the vulnerability has been addressed.
What versions of LibPNG are affected by CVE-2025-64506?
CVE-2025-64506 affects LibPNG versions from 1.6.0 to before 1.6.51.
What type of vulnerability is CVE-2025-64506?
CVE-2025-64506 is a heap buffer over-read vulnerability found in the png_write_image_8bit function of LibPNG.
What are the potential impacts of CVE-2025-64506?
The potential impacts of CVE-2025-64506 may include application crashes and the possibility of information leaks.