Skip to content
OpenAdvisories
Medium · 6.1 CVE-2025-64506 EUVD-2025-199238

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

Published Nov 24, 2025 · Updated Nov 25, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
pnggroup libpng >= 1.6.0, < 1.6.51 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libpng1.6 1.6.51-1 —
Debian 13 libpng1.6 1.6.48-1+deb13u1 DSA-6076-1
Debian 12 libpng1.6 1.6.39-2+deb12u1 DSA-6076-1
Debian 11 libpng1.6 1.6.37-3+deb11u1 DLA-4396-1
ReleasePackageFixed inAdvisory
Ubuntu 25.10 libpng1.6 1.6.50-1ubuntu0.1 —
Ubuntu 24.04 LTS libpng1.6 1.6.43-5ubuntu0.1 —
Ubuntu 22.04 LTS libpng1.6 1.6.37-3ubuntu0.1 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS libpng1.6 1.6.37-2ubuntu0.1~esm1 —
Ubuntu Pro 18.04 LTS libpng1.6 1.6.34-1ubuntu0.18.04.2+esm1 —
Ubuntu Pro 16.04 LTS libpng1.6 1.6.20-2ubuntu0.1~esm2 —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 libpng +3 1.6.56-1.hum1 RHSA-2026:80330, RHSA-2026:6732
ReleasePackageFixed inAdvisory
SLES 15 SP7 libpng16 1.6.40-150600.3.3.1 SUSE-SU-2025:4494-1
SLES 15 SP6 libpng16 1.6.40-150600.3.3.1 SUSE-SU-2025:4494-1
SLES 15 SP5 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLES 15 SP4 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLES 15 SP3 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
Show 19 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 libpng16 1.6.8-15.9.1 SUSE-SU-2025:4533-1
SLES for SAP 16.0 libpng16 1.6.44-160000.3.1 SUSE-SU-2026:20030-1
SLES for SAP 15 SP5 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLES for SAP 15 SP4 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLES for SAP 15 SP3 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLES 16.0 libpng16 1.6.44-160000.3.1 SUSE-SU-2026:20030-1
SLE Micro 6.2 libpng16 1.6.44-160000.3.1 SUSE-SU-2026:20073-1
SLE Micro 6.1 libpng16 1.6.43-slfo.1.1_2.1 SUSE-SU-2026:23514-1, SUSE-SU-2025:21220-1
SLE Micro 6.0 libpng16 1.6.43-2.1 SUSE-SU-2026:23063-1, SUSE-SU-2025:21217-1
SLE Micro 5.5 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLE Micro 5.4 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLE Micro 5.3 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLE Micro 5.2 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLE HPC 15 SP5 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLE HPC 15 SP4 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SLE HPC 15 SP3 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SUSE Manager Server LTS 4.3 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SUSE Manager Proxy LTS 4.3 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
SUSE Enterprise Storage 7.1 libpng16 1.6.34-150000.3.12.1 SUSE-SU-2025:4436-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed libpng16 1.6.51-1.1 openSUSE-SU-2025:15781-1
openSUSE Leap 16.0 libpng16 1.6.44-160000.3.1 openSUSE-SU-2026:20017-1
openSUSE Leap 15.6 libpng16 1.6.40-150600.3.3.1 SUSE-SU-2025:4494-1
ReleasePackageFixed inAdvisory
Alpine v3.24 libpng 1.6.51-r0 —
Alpine v3.23 libpng 1.6.51-r0 —
Alpine v3.22 libpng 1.6.51-r0 —
Alpine v3.21 libpng 1.6.53-r0 —
Alpine v3.20 libpng 1.6.53-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 firefox 140.5.0-1.amzn2023.0.2 ALAS2023-2025-1305
Amazon Linux 2023 libpng +3 2:1.6.37-10.amzn2023.0.7 ALAS2023-2025-1306
Amazon Linux 2 thunderbird 140.4.0-1.amzn2.0.3 ALAS2-2025-3091

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 fltk +3 No fix yet —
Azure Linux 3 libpng 1.6.51-1 —
Azure Linux 2 (CBL-Mariner) fltk +2 No fix yet —
Azure Linux 2 (CBL-Mariner) libpng 1.6.51-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling libpng 1.6.51-r0 —

Advisories 21

References