CVE-2025-65018 LIBPNG is vulnerable to a heap buffer overflow in `png_combine_row` triggered via `png_image_finish_read`
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.
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.
Other vulnerabilities in Libpng Libpng
- CVE-2017-12652 Denial of service in n/a
- CVE-2018-14550 Out-of-bounds write in libpng
- CVE-2026-25646 LIBPNG has a heap buffer overflow in png_set_quantize
- CVE-2026-33636 LIBPNG has ARM NEON Palette Expansion Out-of-Bounds Read on AArch64
- CVE-2026-33416 LIBPNG has use-after-free via pointer aliasing in `png_set_tRNS` and `png_set_PLTE`
Sources
Also known as A-463998243, ALPINE-CVE-2025-65018, ASB-A-463998243, AZL-70850, AZL-70853, AZL-70874 and 17 more.