{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d"
            },
            {
              "fixed": "63ad0902bc0b3b3e82e30d8ac3e5135937bac0c0"
            }
          ],
          "repo": "https://github.com/greyclab/cimg",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-4663-63fm-44gc"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-190"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42144.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "fixed": "4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "CImg Library is a C++ library for image processing. Prior to commit 4ca26bc, there is an integer overflow vulnerability in the W*H*D size computation inside _load_pnm() that can bypass the memory allocation guard. A crafted PNM/PGM/PPM file with large dimension values causes the overflow to wrap around, allocating an undersized buffer and potentially triggering a heap buffer overflow. Any application using CImg to load untrusted image files is affected. This issue has been patched via commit 4ca26bc.",
  "id": "CVE-2026-42144",
  "modified": "2026-07-15T01:49:21.574738491Z",
  "published": "2026-05-04T17:51:38.144Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/GreycLab/CImg/releases/tag/v.3.7.5"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42144.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/GreycLab/CImg/security/advisories/GHSA-4663-63fm-44gc"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42144"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/GreycLab/CImg/issues/478"
    },
    {
      "type": "FIX",
      "url": "https://github.com/GreycLab/CImg/commit/4ca26bce4d8c61fcd1507d5f9401b9fb1222c27d"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "CImg Library: Integer overflow in PNM size check bypasses memory guard (_load_pnm)"
}