LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. Prior to version 1.6.51, a heap buffer over-read vulnerability exists in libpng's pngdoquantize function when processing PNG files with malformed palette indices. The vulnerability occurs when palette_lookup array bounds are not validated against externally-supplied image data, allowing an attacker to craft a PNG file with out-of-range palette indices that trigger out-of-bounds memory access. This issue has been patched in version 1.6.51.
{
"cwe_ids": [
"CWE-125"
]
}[
{
"id": "CVE-2025-64505-1ff2fa39",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"166375070723291529406421301066248769034",
"275647010778297936193963675511576832388",
"256826767335212246520616614652191899280",
"279336807821086835335477021495116274772",
"289998086382119027680343151146219735692",
"127562272222925286109814353033687270978",
"25813353444574047506367402039418644046",
"253582453789718568595455958296774742498"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://github.com/glennrp/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"target": {
"file": "png.h"
}
},
{
"id": "CVE-2025-64505-485b33da",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"156580915294223224015440899088615326697",
"218405736567565762721805663647781263162",
"85662020663482796805838288188511316315",
"230686006833406113235008350425423979914",
"260919417129355689179955630465652050316",
"95506800799202743812829450076592490423"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://github.com/glennrp/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"target": {
"file": "png.c"
}
},
{
"id": "CVE-2025-64505-a8777218",
"signature_version": "v1",
"digest": {
"function_hash": "308839484675692000161271595223156832928",
"length": 481.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://github.com/glennrp/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"target": {
"file": "png.c",
"function": "png_get_copyright"
}
},
{
"id": "CVE-2025-64505-e1a15be6",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"52540900908244694562855646578057113774",
"200219053898519147474761570586990540810",
"23871324486584156747326023564743243101",
"63048311541359152088830007041723625585"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://github.com/glennrp/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"target": {
"file": "pngtest.c"
}
}
]
[
{
"id": "CVE-2025-64505-c062dfb3",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"310430768601001916100977306469197890855",
"131058169673690107401609625493491871538",
"120927534206599550423552132131692841909",
"39288152629051006683908432084350017728",
"205735928495447827427748798317942579262",
"52765581048667246168412988515153451241",
"63281823169701133040883966044472731172"
]
},
"deprecated": false,
"signature_type": "Line",
"source": "https://github.com/pnggroup/libpng/commit/6a528eb5fd0dd7f6de1c39d30de0e41473431c37",
"target": {
"file": "pngrtran.c"
}
},
{
"id": "CVE-2025-64505-d01f0b7e",
"signature_version": "v1",
"digest": {
"function_hash": "282799652390732722450749695380593523084",
"length": 6147.0
},
"deprecated": false,
"signature_type": "Function",
"source": "https://github.com/pnggroup/libpng/commit/6a528eb5fd0dd7f6de1c39d30de0e41473431c37",
"target": {
"file": "pngrtran.c",
"function": "png_set_quantize"
}
}
]