{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.16.0"
                  },
                  {
                    "fixed": "1.23.6"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "fixed": "8dc32399dea3e6e9e6b4a3acf270feb80008649c"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "v1.23.6",
                "range": [
                  {
                    "fixed": "f81f28ac014b1c28dee483ac45b72c6b05bc421a"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "6f479d76f57d68bb8d1a842aea37544834fdbe40"
            },
            {
              "fixed": "f81f28ac014b1c28dee483ac45b72c6b05bc421a"
            },
            {
              "fixed": "8dc32399dea3e6e9e6b4a3acf270feb80008649c"
            }
          ],
          "repo": "https://github.com/strukturag/libheif",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-q7mw-2fmm-5q94"
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-129"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142502.json"
  },
  "details": "libheif 1.16.0 before 1.23.6 contains an out-of-bounds read vulnerability in Op_Any_RGB_to_YCbCr_420_Sharp::convert_colorspace() that passes unchecked 10-bit or 12-bit RGB samples to SharpYuvConvert(). Attackers can supply a crafted HEIF file producing samples above the declared bit depth so libsharpyuv gamma table lookups read out of bounds, crashing the process or leaking memory into output pixels.",
  "id": "CVE-2026-142502",
  "modified": "2026-12-02T18:45:44.987180389Z",
  "published": "2026-12-02T17:42:25.463Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142502.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/strukturag/libheif"
    },
    {
      "type": "ARTICLE",
      "url": "https://github.com/strukturag/libheif/blob/v1.23.5/libheif/color-conversion/rgb2yuv_sharp.cc#L251-L255"
    },
    {
      "type": "FIX",
      "url": "https://github.com/strukturag/libheif/commit/8dc32399dea3e6e9e6b4a3acf270feb80008649c"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/strukturag/libheif/releases/tag/v1.23.6"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/strukturag/libheif/security/advisories/GHSA-q7mw-2fmm-5q94"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142502"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/libheif-1.16.0-before-1.23.6-out-of-bounds-read-via-sharp-yuv-conversion"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "libheif 1.16.0 before 1.23.6 Out-of-Bounds Read via Sharp-YUV Conversion"
}