CVE-2023-29659: Github.com/strukturag/libheif Libheif Vulnerable To Segmentation Fault Vulnerability

MODERATE
Advisory Identifier: GHSA-22fx-6r9m-r8h9
CVSS 6.5
CWE-369
Published
Advisory Summary

CVE-2023-29659 is a MODERATE (CVSS 6.5) libheif vulnerable to segmentation fault vulnerability (CWE-369: Divide By Zero) affecting Github.com/strukturag/libheif libraries in the Go ecosystem. The issue involves libheif vulnerable to segmentation fault via floating point exception. Remediation is available by upgrading affected packages to version 1.15.2.

CVE-2023-29659 at a Glance

CVE Identifier CVE-2023-29659
GHSA Identifier GHSA-22fx-6r9m-r8h9
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-369: Divide By Zero
Affected Product Github.com/strukturag/libheif
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-29659

To remediate this vulnerability, upgrade all affected Github.com/strukturag/libheif dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/strukturag/libheif fixed: 1.15.2
Upgrade github.com/strukturag/libheif to 1.15.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/strukturag/libheif

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-29659, inspect your project dependencies for Github.com/strukturag/libheif:

inspect dependencies for github.com/strukturag/libheif

Analyze the terminal output to locate any version of Github.com/strukturag/libheif in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.15.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-369: Divide By Zero, where the product divides a value by zero. In Github.com/strukturag/libheif, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A Segmentation fault caused by a floating point exception exists in libheif 1.15.1 using crafted heif images via the heif::Fraction::round() function in box.cc, which causes a denial of service.

CVE-2023-29659 Affected Github.com/strukturag/libheif Versions

1 component(s)
Fixed Versions:
1.15.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/strukturag/libheif
Go
< 1.15.2
1.15.2

References

Frequently Asked Questions

What is CVE-2023-29659?
CVE-2023-29659 is a security vulnerability in Github.com/strukturag/libheif involving libheif vulnerable to segmentation fault via floating point exception under CWE-369: Divide By Zero.
Which Github.com/strukturag/libheif versions are affected?
Affected versions include releases prior to 1.15.2 across affected packages: github.com/strukturag/libheif.
What version fixes CVE-2023-29659?
Upgrading to 1.15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/strukturag/libheif affected?
Yes, github.com/strukturag/libheif is affected in releases prior to 1.15.2. Upgrade your dependency to 1.15.2 or later.
What is the CVSS score of CVE-2023-29659?
CVE-2023-29659 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-29659?
CVE-2023-29659 is classified under CWE-369: Divide By Zero (The product divides a value by zero.).
How can I check Go dependencies for CVE-2023-29659?
Run the dependency tree command: 'inspect dependencies for github.com/strukturag/libheif'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-22fx-6r9m-r8h9",
  "modified" : "2025-01-29T22:00:08Z",
  "published" : "2023-05-05T18:30:17Z",
  "aliases" : [ "CVE-2023-29659" ],
  "summary" : "libheif vulnerable to segmentation fault via floating point exception",
  "details" : "A Segmentation fault caused by a floating point exception exists in libheif 1.15.1 using crafted heif images via the heif::Fraction::round() function in box.cc, which causes a denial of service.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/strukturag/libheif"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.15.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-29659"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strukturag/libheif/issues/794"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strukturag/libheif/commit/e05e15b57a38ec411cb9acb38512a1c36ff62991"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CKAE6NQBA3Q7GS6VTNDZRZZZVPPEFUEZ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LGKHDCS4HRZE3UGXYYDYPTIPNIBRLQ5L"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CKAE6NQBA3Q7GS6VTNDZRZZZVPPEFUEZ"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LGKHDCS4HRZE3UGXYYDYPTIPNIBRLQ5L"
  }, {
    "type" : "PACKAGE",
    "url" : "github.com/strukturag/libheif"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-369" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-02T21:18:04Z",
    "nvd_published_at" : "2023-05-05T16:15:09Z"
  }
}