{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "158db3ad7f38ab3023f5dce59fb17a0f27a8cd43"
            }
          ],
          "repo": "https://github.com/dlemstra/magick.net",
          "type": "GIT"
        },
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "7.0.0-0"
              },
              {
                "fixed": "7.1.2-19"
              }
            ],
            "source": [
              "CPE_RANGE",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "9fbd2b79450e930edb95e8158d412e57a7b27e83"
            },
            {
              "fixed": "3d653bea2df085c728a1c8f775808e1e9249dff9"
            }
          ],
          "repo": "https://github.com/imagemagick/imagemagick",
          "type": "GIT"
        },
        {
          "database_specific": {
            "cpe": "cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*",
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "6.9.13-44"
              }
            ],
            "source": "CPE_RANGE"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "9da424baef0c23b1b05678b2c31102e35313adc5"
            }
          ],
          "repo": "https://github.com/imagemagick/imagemagick6",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-pwg5-6jfc-crvh"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-122",
      "CWE-787"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40310.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "fixed": "6.9.13-44"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "ImageMagick is free and open-source software used for editing and manipulating digital images. Versions below both 7.1.2-19 and 6.9.13-44, contain a heap out-of-bounds write in the JP2 encoder with when a user specifies an invalid sampling index. This issue has been fixed in versions 6.9.13-44 and 7.1.2-19.",
  "id": "CVE-2026-40310",
  "modified": "2026-07-15T01:48:50.529544615Z",
  "published": "2026-04-13T21:32:53.361Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/ImageMagick/ImageMagick/releases/tag/7.1.2-19"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dlemstra/Magick.NET/releases/tag/14.12.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40310.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-pwg5-6jfc-crvh"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40310"
    },
    {
      "type": "FIX",
      "url": "https://github.com/ImageMagick/ImageMagick/commit/3d653bea2df085c728a1c8f775808e1e9249dff9"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "ImageMagick: Heap out-of-bounds write in JP2 encoder"
}