Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2018-13785

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-13785
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 09:12 UTC · Revision 1

Source evidence

CVE-2018-13785

core-osv · Original source

Published 9 Jul 2018, 13:29 UTC

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.

osv:CVE-2018-13785
Complete source record
{
  "id": "ccab869cdcd91ec5cca7a7954a2349fd672e723d9022c2a1b7c700360f5b13a7",
  "url": "https://osv.dev/vulnerability/CVE-2018-13785",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-13785",
    "summary": "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.",
    "evidence": "osv:CVE-2018-13785",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2018-13785",
      "aliases": [
        "CVE-2018-13785"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pnggroup/libpng",
              "type": "GIT",
              "events": [
                {
                  "introduced": "b78804f9a2568b270ebd30eca954ef7447ba92f7"
                },
                {
                  "last_affected": "b78804f9a2568b270ebd30eca954ef7447ba92f7"
                },
                {
                  "fixed": "8a05766cb74af05c04c53e6c9d60c13fc4d59bf2"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:libpng:libpng:1.6.34:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.6.34"
                      },
                      {
                        "last_affected": "1.6.34"
                      }
                    ],
                    "source": "CPE_STRING"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8a05766cb74af05c04c53e6c9d60c13fc4d59bf2"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.6.34",
            "v1.6.34"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-13785.json",
            "vanir_signatures": [
              {
                "id": "CVE-2018-13785-a84a3113",
                "digest": {
                  "length": 987,
                  "function_hash": "282460725215391584583494778972512461376"
                },
                "source": "https://github.com/pnggroup/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2",
                "target": {
                  "file": "pngrutil.c",
                  "function": "png_check_chunk_length"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2018-13785-f0bc505a",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "107966026133260924818778745914586419456",
                    "256164953430444557586735334527917876014",
                    "73440847196266064536662526583930052559",
                    "135968293059614300638946458008389177687",
                    "325492539394967073006475273665072020765",
                    "106295171231175941086144928405087290842",
                    "18891773824478661748387439301515208175"
                  ]
                },
                "source": "https://github.com/pnggroup/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2",
                "target": {
                  "file": "pngrutil.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-24T14:11:33Z"
          }
        }
      ],
      "modified": "2026-10-24T14:11:33.562756579Z",
      "provider": "osv",
      "references": [
        "https://access.redhat.com/errata/RHSA-2018:3000",
        "https://access.redhat.com/errata/RHSA-2018:3001",
        "https://access.redhat.com/errata/RHSA-2018:3002",
        "https://access.redhat.com/errata/RHSA-2018:3003",
        "https://access.redhat.com/errata/RHSA-2018:3007",
        "https://access.redhat.com/errata/RHSA-2018:3008",
        "https://access.redhat.com/errata/RHSA-2018:3533",
        "https://access.redhat.com/errata/RHSA-2018:3534",
        "https://access.redhat.com/errata/RHSA-2018:3671",
        "https://access.redhat.com/errata/RHSA-2018:3672",
        "https://access.redhat.com/errata/RHSA-2018:3779",
        "https://access.redhat.com/errata/RHSA-2018:3852",
        "https://security.gentoo.org/glsa/201908-10",
        "https://security.netapp.com/advisory/ntap-20181018-0001/",
        "https://sourceforge.net/p/libpng/bugs/278/",
        "https://usn.ubuntu.com/3712-1/",
        "https://github.com/glennrp/libpng/commit/8a05766cb74af05c04c53e6c9d60c13fc4d59bf2"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*"
            ],
            "vendor_product": "canonical:ubuntu_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "14.04"
                  },
                  {
                    "last_affected": "14.04"
                  },
                  {
                    "introduced": "16.04"
                  },
                  {
                    "last_affected": "16.04"
                  },
                  {
                    "introduced": "17.10"
                  },
                  {
                    "last_affected": "17.10"
                  },
                  {
                    "introduced": "18.04"
                  },
                  {
                    "last_affected": "18.04"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:libpng:libpng:1.6.34:*:*:*:*:*:*:*"
            ],
            "vendor_product": "libpng:libpng",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.6.34"
                  },
                  {
                    "last_affected": "1.6.34"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:jdk:1.6.0:update201:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:jdk:1.7.0:update191:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:jdk:1.8.0:update181:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:jdk:11.0.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:jdk",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.6.0-update201"
                  },
                  {
                    "last_affected": "1.6.0-update201"
                  },
                  {
                    "introduced": "1.7.0-update191"
                  },
                  {
                    "last_affected": "1.7.0-update191"
                  },
                  {
                    "introduced": "1.8.0-update181"
                  },
                  {
                    "last_affected": "1.8.0-update181"
                  },
                  {
                    "introduced": "11.0.0"
                  },
                  {
                    "last_affected": "11.0.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:oracle:jre:1.6.0:update201:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:jre:1.7.0:update191:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:jre:1.8.0:update181:*:*:*:*:*:*",
              "cpe:2.3:a:oracle:jre:11.0.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "oracle:jre",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.6.0-update201"
                  },
                  {
                    "last_affected": "1.6.0-update201"
                  },
                  {
                    "introduced": "1.7.0-update191"
                  },
                  {
                    "last_affected": "1.7.0-update191"
                  },
                  {
                    "introduced": "1.8.0-update181"
                  },
                  {
                    "last_affected": "1.8.0-update181"
                  },
                  {
                    "introduced": "11.0.0"
                  },
                  {
                    "last_affected": "11.0.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_desktop:6.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_desktop:7.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_desktop",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "6.0"
                  },
                  {
                    "last_affected": "6.0"
                  },
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_server:6.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_server:7.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_server",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "6.0"
                  },
                  {
                    "last_affected": "6.0"
                  },
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:redhat:enterprise_linux_workstation:6.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:redhat:enterprise_linux_workstation:7.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux_workstation",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "6.0"
                  },
                  {
                    "last_affected": "6.0"
                  },
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2018-13785",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 443265,
  "published_at": "2018-07-09T13:29:00.443+00:00"
}