CVE-2026-40930: libpng chunk smuggling in push-mode APNG parser

CVE-2026-40930 · Severity: medium · CVSS 5.4 · Published 2026-06-04

libpng is a widely used software library for reading and writing PNG image files, found in web browsers like Firefox and various operating systems. A vulnerability in how it handles animated PNG (APNG) files allows a specially crafted image to 'smuggle' hidden data past security checks. Depending on how an application is configured, this could result in the application failing to load images (denial of service) or displaying incorrect, attacker-controlled image content.

Quick answers

Is CVE-2026-40930 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40930 being exploited in the wild.
How severe is CVE-2026-40930?
Medium severity, with a CVSS score of 5.4, published 4 June 2026.
Which products and versions are affected?
Daisuke Nishikawa Libpng-Apng Patch 1.6.49-apng.patch through 1.6.57-apng.patch.
Is there a fix for CVE-2026-40930?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-40930 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-40930?
Check whether you run Daisuke Nishikawa Libpng-Apng Patch at an affected version. 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 chunk-smuggling vulnerability exists in the push-mode APNG parser of libpng 1.8.0 and the third-party libpng-apng patch for version 1.6.x. Three inter-frame chunk discard paths in `png_push_read_chunk` clear the chunk-header flag without consuming the chunk body and CRC. This allows attacker-controlled bytes within an ignored ancillary chunk to be reinterpreted as a fresh chunk header during the next `png_process_data` call. If the application uses a relaxed CRC configuration (e.g., `PNG_CRC_QUIET_USE`), the smuggled data can reach the zlib decompressor and be rendered as frame pixel data. Under default configurations, the mismatch typically triggers a fatal `png_error`, resulting in a denial of service. The issue is fixed in libpng 1.8.0 commit faf0692 and libpng-apng patch v2 for 1.6.57/1.6.58.

Affected products

  • libpng group libpng 1.8.0 (development branch)
  • Daisuke Nishikawa libpng-apng patch 1.6.49-apng.patch through 1.6.57-apng.patch

Timeline

  • 2026-05-15: disclosed: Initial disclosure on oss-security mailing list and GitHub advisory
  • 2026-06-04: advisory: NVD publication date

References

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