Heap-based buffer overflow in libpng - CVE-2025-65018

 

Heap-based buffer overflow in libpng - CVE-2025-65018

Published: November 26, 2025 / Updated: January 7, 2026


Vulnerability identifier: #VU118777
CSH Severity: Critical
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/U:Red
CVE-ID: CVE-2025-65018
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: Public exploit is available
Vendor: libpng
Affected software:
libpng

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error within the png_image_finish_read() function when processing 16-bit interlaced PNGs with 8-bit output format. A remote attacker can pass a specially crafted image file to the application, trigger a heap-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


How to mitigate CVE-2025-65018

Install updates from vendor's website.

Sources