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, there is a heap buffer overflow vulnerability in the libpng simplified API function pngimagefinish_read when processing 16-bit interlaced PNGs with 8-bit output format. Attacker-crafted interlaced PNG files cause heap writes beyond allocated buffer bounds. This issue has been patched in version 1.6.51.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/ee626f5d79d5817bb21d6f048dc0da4c4e383443/cves/2025/65xxx/CVE-2025-65018.json",
"cwe_ids": [
"CWE-122",
"CWE-787"
],
"cna_assigner": "GitHub_M"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"166375070723291529406421301066248769034",
"275647010778297936193963675511576832388",
"256826767335212246520616614652191899280",
"279336807821086835335477021495116274772",
"289998086382119027680343151146219735692",
"127562272222925286109814353033687270978",
"25813353444574047506367402039418644046",
"253582453789718568595455958296774742498"
]
},
"source": "https://github.com/pnggroup/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"deprecated": false,
"id": "CVE-2025-65018-547918c0",
"signature_version": "v1",
"signature_type": "Line",
"target": {
"file": "png.h"
}
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"52540900908244694562855646578057113774",
"200219053898519147474761570586990540810",
"23871324486584156747326023564743243101",
"63048311541359152088830007041723625585"
]
},
"source": "https://github.com/pnggroup/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"deprecated": false,
"id": "CVE-2025-65018-6bf57c8e",
"signature_version": "v1",
"signature_type": "Line",
"target": {
"file": "pngtest.c"
}
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"156580915294223224015440899088615326697",
"218405736567565762721805663647781263162",
"85662020663482796805838288188511316315",
"230686006833406113235008350425423979914",
"260919417129355689179955630465652050316",
"95506800799202743812829450076592490423"
]
},
"source": "https://github.com/pnggroup/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"deprecated": false,
"id": "CVE-2025-65018-9afdfcea",
"signature_version": "v1",
"signature_type": "Line",
"target": {
"file": "png.c"
}
},
{
"digest": {
"length": 481.0,
"function_hash": "308839484675692000161271595223156832928"
},
"source": "https://github.com/pnggroup/libpng/commit/49363adcfaf098748d7a4c8c624ad8c45a8c3a86",
"deprecated": false,
"id": "CVE-2025-65018-d048d988",
"signature_version": "v1",
"signature_type": "Function",
"target": {
"function": "png_get_copyright",
"file": "png.c"
}
}
]