{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "8.18.3"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "cff17794f0698a4f47c74bb31c9700b2c83252a8"
            },
            {
              "fixed": "3664cfc5dc2c5661288f5bf5a85ccc51c64c1626"
            }
          ],
          "repo": "https://github.com/libvips/libvips",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-h27h-jf9v-m8rg"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-126"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70652.json"
  },
  "details": "libvips is a fast image processing library with low memory needs. Prior to version 8.18.3, libvips built with libultrahdr support can incorrectly size an output buffer in libvips/foreign/uhdrsave.c within vips_foreign_save_uhdr_set_raw_hdr when a pipeline enlarges an incoming JPEG to a very large output before encoding a gain map through VipsForeignSaveUhdr. The undersized allocation can cause a heap buffer over-read that may disclose adjacent data or crash the process. This issue is fixed in version 8.18.3.",
  "id": "CVE-2026-70652",
  "modified": "2026-08-23T03:42:38.171252731Z",
  "published": "2026-08-20T21:04:51.898Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/libvips/libvips/releases/tag/v8.18.3"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70652.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/libvips/libvips/security/advisories/GHSA-h27h-jf9v-m8rg"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-70652"
    },
    {
      "type": "FIX",
      "url": "https://github.com/libvips/libvips/commit/cff17794f0698a4f47c74bb31c9700b2c83252a8"
    },
    {
      "type": "FIX",
      "url": "https://github.com/libvips/libvips/pull/5039"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "libvips: Possible heap-based buffer read overflow when resizing and re-encoding a JPEG with gain map"
}