Repository navigation
Description
Description:
My app is built with Flutter SDK 3.44.8, and the security scanner flagged these CVEs in the Flutter engine's image processing component (libpng). This is a serious concern for my production app, and I am seeking guidance on how to resolve this issue.
Environment:
Flutter SDK version: 3.44.8
Affected Library: libpng 1.6.54
Platform: [e.g., Android / iOS
Vulnerabilities Detected
The following CVEs were reported by the security scanner against my app binary:
-
CVE-2026-25646
Description: LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. Prior to 1.6.55, an out-of-bounds read vulnerability exists in the png_set_quantize() API function. When the function is called with no histogram and the number of colors in the palette is more than twice the maximum supported by the user's display, certain palettes will cause the function to enter into an infinite loop that reads past the end of an internal heap-allocated buffer. The images that trigger this vulnerability are valid per the PNG specification. This vulnerability is fixed in 1.6.55. -
CVE-2026-33636
Description: LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. In versions 1.6.36 through 1.6.55, an out-of-bounds read and write exists in libpng's ARM/AArch64 Neon-optimized palette expansion path. When expanding 8-bit paletted rows to RGB or RGBA, the Neon loop processes a final partial chunk without verifying that enough input pixels remain. Because the implementation works backward from the end of the row, the final iteration dereferences pointers before the start of the row buffer (OOB read) and writes expanded pixel data to the same underflowed positions (OOB write). This is reachable via normal decoding of attacker-controlled PNG input if Neon is enabled. Version 1.6.56 fixes the issue. -
CVE-2026-33416
Description: LIBPNG is a reference library for use in applications that read, create, and manipulate PNG (Portable Network Graphics) raster image files. In versions 1.2.1 through 1.6.55,png_set_tRNSandpng_set_PLTEeach alias a heap-allocated buffer betweenpng_structandpng_info, sharing a single allocation across two structs with independent lifetimes. Thetrans_alphaaliasing has been present since at least libpng 1.0, and thepalettealiasing since at least 1.2.1. Both affect all prior release linespng_set_tRNSsetspng_ptr->trans_alpha = info_ptr->trans_alpha(256-byte buffer) andpng_set_PLTEsetsinfo_ptr->palette = png_ptr->palette(768-byte buffer). In both cases, callingpng_free_data(withPNG_FREE_TRNSorPNG_FREE_PLTE) frees the buffer throughinfo_ptrwhile the correspondingpng_ptrpointer remains dangling. Subsequent row-transform functions dereference and, in some code paths, write to the freed memory. A second call topng_set_tRNSorpng_set_PLTEhas the same effect, because both functions callpng_free_datainternally before reallocating theinfo_ptrbuffer. Version 1.6.56 fixes the issue.
Activity
puneetkukreja98 commentedon Aug 12, 2026
@chinahzlh Thanks for reporting the issue, can you confirm if your issue and this #182018 are same?
chinahzlh commentedon Aug 12, 2026
they are different cve issues, #182018 is issue on libzlib, and mine is on libpng
puneetkukreja98 commentedon Aug 12, 2026
Routing this to team-engine for further investigation.
Related: #181669
gaaclarke commentedon Aug 17, 2026
@chinahzlh can you try with 3.47.0 that just got released, and
main. There were fixes that happened to this. They may have captured your use-case.fyi @jtmcdole @jason-simmons
chinahzlh commentedon Aug 18, 2026
Thanks for your reply. I’ve tested 3.47.0, but the security scan still reports libpng 1.6.54 — no difference. Would you mind double-checking whether libpng was upgraded in this version?
gaaclarke commentedon Aug 18, 2026
Yea, I'm seeing 1.6.54 in
main. The dep needs to be updated.YeaLink89 commentedon Aug 20, 2026
When will this release version be published?
Rolls libpng to 1.6.58 (flutter#191320)
gaaclarke commentedon Aug 20, 2026
Looking into it. Worse case scenario you can build your own engine, the patch is easy to apply.
Typically issues like this are closed when they are fixed on
mainbut I'll keep this open while we consider it's release path.[CP-beta]Rolls libpng to 1.6.58 (#191456)
[CP-stable]Rolls libpng to 1.6.58 (#191452)
gaaclarke commentedon Sep 24, 2026
closed in #191320
github-actions commentedon Oct 8, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.