Use After Free Affecting libpng package, versions [1.5.30,1.6.57)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.02% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CONAN-LIBPNG-15991613
  • published12 Apr 2026
  • disclosed9 Apr 2026
  • creditIv4n

Introduced: 9 Apr 2026

NewCVE-2026-34757  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade libpng to version 1.6.57 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free in the png_set_PLTE, png_set_tRNS, and png_set_hIST functions. An attacker can cause corrupted chunk metadata or leak heap contents by passing a pointer obtained from png_get_PLTE, png_get_tRNS, or png_get_hIST back into the corresponding setter on the same structure, leading to reading from freed memory and copying its contents into a replacement buffer.

CVSS Base Scores

version 4.0
version 3.1