Buffer Overflow Affecting libpng package, versions [,1.6.47)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.01% (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 IDSNYK-CONAN-LIBPNG-15119981
  • published27 Jan 2026
  • disclosed27 Jan 2026
  • creditkaiyu xie

Introduced: 27 Jan 2026

CVE-2025-28164  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

Upgrade libpng to version 1.6.47 or higher.

Overview

Affected versions of this package are vulnerable to Buffer Overflow via the read_png() function. An attacker can cause a crash or potentially execute arbitrary code by providing damaged PNG file to this function.

Note:

As mentioned by the package maintainer, the flawed logic wasn't introduced only in version 1.6.43, it was always present and 1.6.43 is the version the reporter used for fuzz testing.

PoC

While running pngimage tests with AddressSanitizer (ASan), memory leaks were detected in read_png() during calls to png_create_read_struct() and png_create_info_struct(). The leaked memory is allocated in png_malloc_base() but never freed.

CVSS Base Scores

version 4.0
version 3.1