{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:struktur:libheif:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.22.0"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0c81a846b7401dbdb7118afd0761057f21e43511"
            }
          ],
          "repo": "https://github.com/strukturag/libheif",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-frfr-f3vg-2g6j"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-787"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32740.json"
  },
  "details": "libheif is a HEIF and AVIF file format decoder and encoder. Versions 1.21.2 and prior contain a heap-buffer-overflow (write) vulnerability in the grid tile compositing, allowing an attacker to write 64 bytes of fully attacker-controlled data past the end of a chroma plane heap allocation by crafting a HEIF/AVIF file with a 1×4 grid of odd-height tiles. The overflow is triggered during normal image decoding with default build configuration. The written bytes are chroma (Cb/Cr) pixel values from the attacking tile, giving the attacker full control over the overflow content. This issue has been fixed in version 1.22.0.",
  "id": "CVE-2026-32740",
  "modified": "2026-07-08T05:38:06.953657021Z",
  "published": "2026-05-19T19:22:07.743Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/strukturag/libheif/releases/tag/v1.22.0"
    },
    {
      "type": "WEB",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32740.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://access.redhat.com/security/cve/CVE-2026-32740"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/32xxx/CVE-2026-32740.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/strukturag/libheif/security/advisories/GHSA-frfr-f3vg-2g6j"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-32740"
    },
    {
      "type": "REPORT",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2479969"
    }
  ],
  "schema_version": "1.7.5",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "libheif: Heap-Buffer-Overflow Write in Grid Tile Chroma Compositing"
}