CVE-2026-33416 LIBPNG has use-after-free via pointer aliasing in `png_set_tRNS` and `png_set_PLTE`

High 7.5 Published Updated

A use-after-free vulnerability in libpng allows attackers to execute arbitrary code or cause denial of service via crafted PNG files.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-33416?

CVE-2026-33416 is a high-severity use after free vulnerability in Libpng Libpng, published on 26 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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_tRNS` and `png_set_PLTE` each alias a heap-allocated buffer between `png_struct` and `png_info`, sharing a single allocation across two structs with independent lifetimes. The `trans_alpha` aliasing has been present since at least libpng 1.0, and the `palette` aliasing since at least 1.2.1. Both affect all prior release lines `png_set_tRNS` sets `png_ptr->trans_alpha = info_ptr->trans_alpha` (256-byte buffer) and `png_set_PLTE` sets `info_ptr->palette = png_ptr->palette` (768-byte buffer). In both cases, calling `png_free_data` (with `PNG_FREE_TRNS` or `PNG_FREE_PLTE`) frees the buffer through `info_ptr` while the corresponding `png_ptr` pointer remains dangling. Subsequent row-transform functions dereference and, in some code paths, write to the freed memory. A second call to `png_set_tRNS` or `png_set_PLTE` has the same effect, because both functions call `png_free_data` internally before reallocating the `info_ptr` buffer. Version 1.6.56 fixes the issue.

Weakness: CWE-416

Which versions are affected by CVE-2026-33416?

It affects 1 product.

Linux distribution packages (40)
libpng AlmaLinux:10All versions2:1.6.40-8.el10_1.4
libpng-devel AlmaLinux:10All versions2:1.6.40-8.el10_1.4
libpng AlmaLinux:8All versions2:1.6.34-11.el8_10
libpng-devel AlmaLinux:8All versions2:1.6.34-11.el8_10
libpng12 AlmaLinux:8All versions1.2.57-7.el8_10
libpng15 AlmaLinux:8All versions1.5.30-9.el8_10
libpng AlmaLinux:9All versions2:1.6.37-12.el9_7.4
libpng-devel AlmaLinux:9All versions2:1.6.37-12.el9_7.4
libpng15 AlmaLinux:9All versions1.5.30-15.el9_8.1
libpng Red Hat:enterprise_linux:10.1All versions2:1.6.40-8.el10_1.4
libpng-debuginfo Red Hat:enterprise_linux:10.1All versions2:1.6.40-8.el10_1.4
libpng-debugsource Red Hat:enterprise_linux:10.1All versions2:1.6.40-8.el10_1.4
libpng-devel Red Hat:enterprise_linux:10.1All versions2:1.6.40-8.el10_1.4
libpng-devel-debuginfo Red Hat:enterprise_linux:10.1All versions2:1.6.40-8.el10_1.4
libpng-tools-debuginfo Red Hat:enterprise_linux:10.1All versions2:1.6.40-8.el10_1.4
libpng12 Red Hat:enterprise_linux:8::appstreamAll versions0:1.2.57-7.el8_10
libpng12-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:1.2.57-7.el8_10
libpng12-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:1.2.57-7.el8_10
libpng15 Red Hat:enterprise_linux:8::appstreamAll versions0:1.5.30-9.el8_10
libpng15-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:1.5.30-9.el8_10
libpng15-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:1.5.30-9.el8_10
libpng Red Hat:enterprise_linux:8::baseosAll versions2:1.6.34-11.el8_10
libpng-debuginfo Red Hat:enterprise_linux:8::baseosAll versions2:1.6.34-11.el8_10
libpng-debugsource Red Hat:enterprise_linux:8::baseosAll versions2:1.6.34-11.el8_10
libpng-devel Red Hat:enterprise_linux:8::baseosAll versions2:1.6.34-11.el8_10
libpng-devel-debuginfo Red Hat:enterprise_linux:8::baseosAll versions2:1.6.34-11.el8_10
libpng-tools-debuginfo Red Hat:enterprise_linux:8::baseosAll versions2:1.6.34-11.el8_10
libpng Red Hat:enterprise_linux:9::appstreamAll versions2:1.6.37-12.el9_7.4
libpng-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions2:1.6.37-12.el9_7.4
libpng-debugsource Red Hat:enterprise_linux:9::appstreamAll versions2:1.6.37-12.el9_7.4
libpng-devel Red Hat:enterprise_linux:9::appstreamAll versions2:1.6.37-12.el9_7.4
libpng-devel-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions2:1.6.37-12.el9_7.4
libpng-tools-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions2:1.6.37-12.el9_7.4
libpng15 Red Hat:enterprise_linux:9::appstreamAll versions0:1.5.30-15.el9_8.1
libpng15-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:1.5.30-15.el9_8.1
libpng15-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:1.5.30-15.el9_8.1
libpng Red Hat:enterprise_linux:9::baseosAll versions2:1.6.37-12.el9_7.4
libpng-debuginfo Red Hat:enterprise_linux:9::baseosAll versions2:1.6.37-12.el9_7.4
libpng-debugsource Red Hat:enterprise_linux:9::baseosAll versions2:1.6.37-12.el9_7.4
libpng-devel-debuginfo Red Hat:enterprise_linux:9::baseosAll versions2:1.6.37-12.el9_7.4

Products include Libpng Libpng.

How do I fix CVE-2026-33416?

Upgrade to a fixed version.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2026-33416 being exploited?

There is no known exploitation of CVE-2026-33416 in the wild and no public exploit code.

All Libpng Libpng vulnerabilities

Sources

Also known as ALPINE-CVE-2026-33416, ALSA-2026:18028, ALSA-2026:18064, ALSA-2026:26347, ALSA-2026:26348, ALSA-2026:28244 and 53 more.

Is CVE-2026-33416 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free