Junglewise Threat Intelligence

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

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

Technologies: Libpng Group Libpng.

Executive brief

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.

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