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

Published Nov 22, 2025
·
Updated

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 pngwriteimage8bit function when processing 8-bit images through the simplified write API with convertto8bit 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.

Other sources

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

— Microsoft

Affected Software

5 affected componentsFixes available
libpng LIBPNG>=1.6.0<1.6.51
libpng LIBPNG>=1.6.0<1.6.51
Microsoft cbl2 libpng 1.6.39-1
Microsoft azl3 libpng 1.6.40-1
debian/libpng1.6
1.6.39-2+deb12u51.6.39-2+deb12u61.6.48-1+deb13u51.6.48-1+deb13u61.6.59-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/libpng1.6 to a version that resolves this vulnerability.

    Fixed in 1.6.39-2+deb12u5Fixed in 1.6.39-2+deb12u6Fixed in 1.6.48-1+deb13u5Fixed in 1.6.48-1+deb13u6Fixed in 1.6.59-1
  2. Upgrade

    Upgrade libpng to a version that resolves this vulnerability.

    Fixed in 1.6.51

Event History

Nov 24, 2025
CVE Published
via MITRE·11:41 PM
Data Sourced
via MITRE·11:41 PM
DescriptionSeverityWeakness
Nov 25, 2025
Data Sourced
via Red Hat·12:01 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·12:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Nov 27, 2025
Data Sourced
via Microsoft·01:04 AM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-64506?

CVE-2025-64506 is classified as a high severity vulnerability due to its potential to cause a heap buffer over-read.

2

How do I fix CVE-2025-64506?

To fix CVE-2025-64506, upgrade LibPNG to version 1.6.51 or later where the vulnerability has been addressed.

3

What versions of LibPNG are affected by CVE-2025-64506?

CVE-2025-64506 affects LibPNG versions from 1.6.0 to before 1.6.51.

4

What type of vulnerability is CVE-2025-64506?

CVE-2025-64506 is a heap buffer over-read vulnerability found in the png_write_image_8bit function of LibPNG.

5

What are the potential impacts of CVE-2025-64506?

The potential impacts of CVE-2025-64506 may include application crashes and the possibility of information leaks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203