CVE-2026-25646: libpng heap buffer overflow in png_set_quantize

CVE-2026-25646 · Severity: high · CVSS 8.1 · Published 2026-02-10

libpng is a widely used software library for reading and processing PNG image files. A vulnerability in how the library handles image color reduction could allow a specially crafted image to cause a system crash or potentially allow an attacker to access sensitive information. This affects any application that uses libpng to process images, such as web browsers, image viewers, and document processors.

Technologies: Libpng. Vendors: Libpng.

Quick answers

Is CVE-2026-25646 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-25646 being exploited in the wild.
How severe is CVE-2026-25646?
High severity, with a CVSS score of 8.1, published 10 February 2026.
Which products and versions are affected?
pnggroup libpng < 1.6.55.
Is there a fix for CVE-2026-25646?
A patch was published on 2026-02-10: libpng 1.6.55 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-25646 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-25646?
Check whether you run Libpng. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A logic error exists in the png_set_quantize() API (formerly png_set_dither()) within libpng. When the function is called without a histogram and the palette size exceeds twice the display's maximum supported colors, a mismatch between current and original palette indices occurs during color pruning. This causes the search bound (max_d) to increment beyond the 769-element heap-allocated 'hash' table, resulting in an infinite loop and out-of-bounds reads/writes. The vulnerability is reachable via network vectors if an application processes untrusted PNGs using the low-level API. The issue is fixed in version 1.6.55 by ensuring original indices are correctly tracked via palette_to_index.

Affected products

  • pnggroup libpng < 1.6.55

Timeline

  • 2026-02-09: disclosed: Vulnerability disclosed on oss-security mailing list
  • 2026-02-10: advisory: GitHub and NVD advisories published
  • 2026-02-10: patched: libpng 1.6.55 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.