Integer Overflow or Wraparound Affecting libpng package, versions [,1.6.37)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
2.92% (86th 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-10077229
  • published8 May 2025
  • disclosed9 Jul 2018
  • creditUnknown

Introduced: 9 Jul 2018

CVE-2018-13785  (opens in a new tab)
CWE-190  (opens in a new tab)
CWE-369  (opens in a new tab)

How to fix?

Upgrade libpng to version 1.6.37 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound. In libpng 1.6.34, a wrong calculation of row_factor in the png_check_chunk_length function (pngrutil.c) may trigger an integer overflow and resultant divide-by-zero while processing a crafted PNG file, leading to a denial of service.

CVSS Base Scores

version 3.1