Vulnerability · Published Nov 24, 2025 · Assigned by GitHub_M

CVE-2025-64505LIBPNG is vulnerable to a heap buffer overflow in `png_do_quantize` via malformed palette index

Medium 6.1

In plain English

A medium-severity out-of-bounds read in libpng from pnggroup. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.2%top 89.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. Prior to version 1.6.51, a heap buffer over-read vulnerability exists in libpng's png_do_quantize function when processing PNG files with malformed palette indices. The vulnerability occurs when palette_lookup array bounds are not validated against externally-supplied image data, allowing an attacker to craft a PNG file with out-of-range palette indices that trigger out-of-bounds memory access. This issue has been patched in version 1.6.51.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20libpng1.6.53-r0ALPINE-CVE-2025-64505
Alpine:v3.21libpng1.6.53-r0ALPINE-CVE-2025-64505
Alpine:v3.22libpng1.6.51-r0ALPINE-CVE-2025-64505
Alpine:v3.23libpng1.6.51-r0ALPINE-CVE-2025-64505
Alpine:v3.24libpng1.6.51-r0ALPINE-CVE-2025-64505
Debian:12libpng1.61.6.39-2+deb12u1DEBIAN-CVE-2025-64505
Debian:12libpng1.61.6.39-2+deb12u1DSA-6076-1
Debian:13libpng1.61.6.48-1+deb13u1DEBIAN-CVE-2025-64505
Debian:13libpng1.61.6.48-1+deb13u1DSA-6076-1
Debian:14libpng1.61.6.51-1DEBIAN-CVE-2025-64505
Ubuntu:22.04:LTSlibpng1.61.6.37-3ubuntu0.1UBUNTU-CVE-2025-64505
Ubuntu:24.04:LTSlibpng1.61.6.43-5ubuntu0.1UBUNTU-CVE-2025-64505
Ubuntu:25.10libpng1.61.6.50-1ubuntu0.1UBUNTU-CVE-2025-64505

Affected products (as reported)

VendorProductVersions
pnggroup libpng < 1.6.51

Weakness: CWE-125 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H

References