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 convertto_8bit 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.
{
"unresolved_ranges": [
{
"extracted_events": [
{
"introduced": "1.6.0"
},
{
"fixed": "1.6.51"
}
],
"source": "AFFECTED_FIELD"
},
{
"extracted_events": [
{
"fixed": "1.6.51"
}
],
"source": "DESCRIPTION"
}
],
"cwe_ids": [
"CWE-125"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64506.json",
"cna_assigner": "GitHub_M"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-64506.json"
[
{
"id": "CVE-2025-64506-2c65d53c",
"target": {
"file": "pngwrite.c",
"function": "png_image_write_main"
},
"source": "https://github.com/pnggroup/libpng/commit/2bd84c019c300b78e811743fbcddb67c9d9bf821",
"digest": {
"function_hash": "287482560906552393873723524112952439303",
"length": 4091.0
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-64506-aed5ccf8",
"target": {
"file": "pngwrite.c"
},
"source": "https://github.com/pnggroup/libpng/commit/2bd84c019c300b78e811743fbcddb67c9d9bf821",
"digest": {
"threshold": 0.9,
"line_hashes": [
"275045913931547721476341089800703559241",
"57554663865845067308084737628464609765",
"212985072000760523111093531678898379495",
"81688707855809561231911606613238509787",
"57631009309811357417734919908001123984"
]
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
}
]
"2026-08-06T14:21:04Z"