Skip to content
OpenAdvisories
Medium · 6.1 CVE-2025-64505 EUVD-2025-199239

LIBPNG is vulnerable to a heap buffer overflow in `png_do_quantize` via malformed palette index

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. 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 products

VendorProductAffectedFixed
pnggroup libpng < 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 4 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 libpng 1.2.54-1ubuntu1.1+esm2 USN-8081-1
Ubuntu Pro 16.04 LTS libpng1.6 1.6.20-2ubuntu0.1~esm2 —
Ubuntu Pro 14.04 LTS libpng 1.2.50-1ubuntu2.14.04.3+esm1 USN-8081-1
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 libpng +3 1.6.56-1.hum1 RHSA-2026:6732
ReleasePackageFixed inAdvisory
SLES 15 SP7 libpng12 1.2.57-150000.4.3.1 SUSE-SU-2025:4432-1
SLES 15 SP7 libpng16 1.6.40-150600.3.3.1 SUSE-SU-2025:4494-1
SLES 15 SP6 libpng12 1.2.57-150000.4.3.1 SUSE-SU-2025:4432-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 libpng12 1.2.50-20.6.1 SUSE-SU-2025:4383-1
SLES 12 SP5 libpng15 1.5.22-10.7.1 SUSE-SU-2026:0898-1
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 libpng12 1.2.59-4.1 openSUSE-SU-2025:15797-1
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 libpng12 1.2.57-150000.4.3.1 SUSE-SU-2025:4432-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 libpng +2 2:1.5.13-8.amzn2.0.6 ALAS2-2025-3112
Amazon Linux 2 libpng12 +1 1.2.50-10.amzn2.0.3 ALAS2-2025-3113
Amazon Linux 2 thunderbird 140.4.0-1.amzn2.0.3 ALAS2-2025-3091

Azure Linux

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

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling libpng 1.6.51-r0 —

Advisories 34

References