Vulnerability · Published Nov 24, 2025 · Assigned by GitHub_M

CVE-2025-64506LIBPNG is vulnerable to a heap buffer over-read in `png_write_image_8bit` with grayscale+alpha or RGB/RGBA images

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.1% (higher than 4% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.1%top 95.8% 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. From version 1.6.0 to before 1.6.51, a heap buffer over-read vulnerability exists in libpng's png_write_image_8bit function when processing 8-bit images through the simplified write API with convert_to_8bit enabled. The vulnerability affects 8-bit grayscale+alpha, RGB/RGBA, and images with incomplete row data. A conditional guard incorrectly allows 8-bit input to enter code expecting 16-bit input, causing reads up to 2 bytes beyond allocated buffer boundaries. This issue has been patched in version 1.6.51.

Affected packages & fixed versions

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

Affected products (as reported)

VendorProductVersions
pnggroup libpng >= 1.6.0, < 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