# CVE-2025-64506: LIBPNG is vulnerable to a heap buffer over-read in \`png\_write\_image\_8bit\` with grayscale+alpha or RGB/RGBA images

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-11-24 · Modified: 2025-11-25
- Aliases: ALPINE-CVE-2025-64506, UBUNTU-CVE-2025-64506, DEBIAN-CVE-2025-64506, CGA-4fhx-7pj5-6vh8, CGA-6vhj-m83h-g876
- Record: https://cvemate.com/vulnerability/CVE-2025-64506 · JSON: https://cvemate.com/vulnerability/CVE-2025-64506/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
- EPSS: 0.15%, percentile 4.344%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine libpng (Alpine Linux): ≥ 1.6.0, \< 1.6.53-r0 \| ≥ 1.6.0, \< 1.6.51-r0
- chainguard libpng (Chainguard): \< 1.6.51-r0
- wolfi libpng (Wolfi): \< 1.6.51-r0
- debian libpng1.6 (Debian): \< 1.6.39-2+deb12u1 \| \< 1.6.48-1+deb13u1 \| \< 1.6.51-1
- ubuntu libpng1.6 (Ubuntu): \< 1.6.20-2ubuntu0.1~esm2 \| \< 1.6.34-1ubuntu0.18.04.2+esm1 \| \< 1.6.37-2ubuntu0.1~esm1 \| \< 1.6.37-3ubuntu0.1 \| \< 1.6.43-5ubuntu0.1 \| \< 1.6.50-1ubuntu0.1
- libpng libpng: ≥ 1.6.0, \< 1.6.51
- pnggroup libpng: ≥ 1.6.0, \< 1.6.51

## References

- <https://github.com/pnggroup/libpng/security/advisories/GHSA-qpr4-xm66-hww6>
- <https://github.com/pnggroup/libpng/pull/749>
- <https://github.com/pnggroup/libpng/commit/2bd84c019c300b78e811743fbcddb67c9d9bf821>
- <https://security.alpinelinux.org/vuln/CVE-2025-64506>
- <https://ubuntu.com/security/CVE-2025-64506>
- <https://www.cve.org/CVERecord?id=CVE-2025-64506>
- <https://www.openwall.com/lists/oss-security/2025/11/22/1>
- <https://ubuntu.com/security/notices/USN-7924-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-64506>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/64xxx/CVE-2025-64506.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-64506>

---

Data as of 2026-12-05T04:44:57.546Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
