CVE-2025-65018 LIBPNG is vulnerable to a heap buffer overflow in `png_combine_row` triggered via `png_image_finish_read`

High 7.1 Published Updated

A heap buffer overflow in libpng allows attackers to execute arbitrary code or cause denial of service via crafted interlaced PNG files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-65018?

CVE-2025-65018 is a high-severity memory corruption vulnerability in Libpng Libpng, published on 24 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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 png_image_finish_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.

Weakness: CWE-787, CWE-122

Which versions are affected by CVE-2025-65018?

It affects 1 product.

Products include Libpng Libpng.

How do I fix CVE-2025-65018?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-65018 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65018 exists.

Public exploit code: 2 proofs of concept on GitHub.

All Libpng Libpng vulnerabilities

Sources

Also known as A-463998243, ALPINE-CVE-2025-65018, ASB-A-463998243, AZL-70850, AZL-70853, AZL-70874 and 17 more.

Is CVE-2025-65018 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free