CVE-2025-65018: LIBPNG is vulnerable to a heap buffer overflow in `png_combine_row` triggered via `png_image_finish_read`
In multiple locations, there is a possible way to achieve remote code execution due to a heap buffer overflow. This could lead to remote escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.
Other sources
Libpng has been updated to version 1.6.51, which contains fixes for security vulnerabilities including CVE-2025-65018 and CVE-2025-64720.
— GitLab
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 pngimagefinishread 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.
— MITRE
LIBPNG is vulnerable to a heap buffer overflow in pngcombinerow triggered via pngimagefinishread
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.3.9600.23132Patch KB5082126 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.14393.9060Patch KB5082198 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.28000.1836Patch KB5083768 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.2.9200.26026Patch KB5082127 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.22631.6936Patch KB5082052 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.26200.8246Patch KB5083769 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.26100.8246Patch KB5083769 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.25398.2274Patch KB5082060 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.26100.32690Patch KB5082063 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.19045.7184Patch KB5082200 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.19044.7184Patch KB5082200 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.20348.5020Patch KB5082142 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 10.0.17763.8644Patch KB5082123 - Upgrade
Upgrade
azurelinux/libpngto a version that resolves this vulnerability.Fixed in 1.6.51-1 - Upgrade
Upgrade
android/platform/external/libpngto a version that resolves this vulnerability.Fixed in 17-next:2026-06-01 - Upgrade
Upgrade
android/platform/external/libpngto a version that resolves this vulnerability.Fixed in 15:2026-06-01 - Upgrade
Upgrade
android/platform/external/libpngto a version that resolves this vulnerability.Fixed in 16:2026-06-01 - Upgrade
Upgrade
android/platform/external/libpngto a version that resolves this vulnerability.Fixed in 16-qpr2:2026-06-01 - Upgrade
Upgrade
android/platform/external/libpngto a version that resolves this vulnerability.Fixed in 14:2026-06-01 - Upgrade
Upgrade
debian/libpng1.6to a version that resolves this vulnerability.Fixed in 1.6.39-2+deb12u5Fixed in 1.6.39-2+deb12u6Fixed in 1.6.48-1+deb13u5Fixed in 1.6.48-1+deb13u6Fixed in 1.6.59-1 - Upgrade
Upgrade
libpngto a version that resolves this vulnerability.Fixed in 1.6.51
Event History
Peer vulnerabilities
Found alongside the following vulnerabilities.
Frequently Asked Questions
What is the severity of CVE-2025-65018?
CVE-2025-65018 has been classified as a high severity vulnerability due to the risk of a heap buffer overflow.
How do I fix CVE-2025-65018?
To mitigate CVE-2025-65018, upgrade libpng to version 1.6.51 or later.
What software is affected by CVE-2025-65018?
CVE-2025-65018 affects libpng versions from 1.6.0 to before 1.6.51.
What type of vulnerability is CVE-2025-65018?
CVE-2025-65018 is a heap buffer overflow vulnerability found in the simplified API function of libpng.
When was CVE-2025-65018 disclosed?
CVE-2025-65018 was disclosed with available patches in early 2025.