CVE-2025-65018CWE-122CWE-787

CVE-2025-65018

High · published November 25, 2025

CVSS v3.1
7.1
EPSS
0%
Percentile
16.6
In the wild
Unconfirmed
What it is

⚡ A seemingly harmless PNG could pack a serious punch! A heap buffer overflow in libpng’s simplified API lets attackers exploit specific 16-bit interlaced images, potentially causing chaos. 🔥 Think of it like a crowded restaurant where extra large orders push past the kitchen’s capacity — too many orders (or data) can overflow onto the floor, creating a mess. In this case, the messy overflow could allow an attacker to run their own code! This vulnerability allows an attacker to write data beyond the allocated buffer, potentially leading to arbitrary code execution or crashes. An attacker could craft a 16-bit interlaced PNG that compromises your application, causing it to behave unpredictably — definitely not something you want in your toolkit!

Put simply

Think of it like a crowded restaurant where extra large orders push past the kitchen’s capacity — too many orders (or data) can overflow onto the floor, creating a mess. In this case, the messy overflow could allow an attacker to run their own code! CVE-2025-65018 is a heap buffer overflow vulnerability in libpng’s png_image_finish_read function, specifically affecting versions 1.6.0 to before 1.6.51. When processing certain interlaced PNG files with an 8-bit output format, the buffer overflow can give attackers the ability to write beyond intended memory bounds.

What to do

This vulnerability allows an attacker to write data beyond the allocated buffer, potentially leading to arbitrary code execution or crashes. An attacker could craft a 16-bit interlaced PNG that compromises your application, causing it to behave unpredictably — definitely not something you want in your toolkit! To safeguard your applications, upgrade to libpng version 1.6.51 or later immediately. Review your image handling practices and ensure robust input validation to mitigate similar vulnerabilities. Don't forget to test your applications thoroughly after the upgrade! You’ve got this! Patch up quickly, and you’ll keep your application safe and sound. 🛡️

The record
Technical detail
CVSS v3.1
7.1 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00259 · 16.6th percentile
Weaknesses
CWE-122 · Heap-based Buffer Overflow; CWE-787 · Out-of-bounds Write
Published
2025-11-25T05:15Z
Affected products (1)
ProductVersionsFixed in
libpng/libpng≥ 1.6.0, < 1.6.511.6.51
References (7)
EPSS history
Timeline
  • 24 NOV 23:50Z
    LIBPNG is vulnerable to a heap buffer overflow in `png_combine_row` triggered via `png_image_finish_read`
    cvelistv5