NULL pointer dereference in MSL (Magick Scripting Language) parser when processing <comment> tag before any image is loaded.
magick MSL:poc.msl out.png
python3 infra/helper.py build_fuzzers imagemagick
python3 infra/helper.py reproduce imagemagick msl_fuzzer poc.msl
Or run the fuzzer directly:
./msl_fuzzer poc.msl
ImageMagick should handle the malformed MSL gracefully and return an error message.
convert: MagickCore/property.c:297: MagickBooleanType DeleteImageProperty(Image *, const char *): Assertion `image != (Image *) NULL' failed.
Aborted
In coders/msl.c:7091, MSLEndElement() calls DeleteImageProperty() on msl_info->image[n] when handling the </comment> end tag without checking if the image is NULL:
if (LocaleCompare((const char *) tag,"comment") == 0 )
{
(void) DeleteImageProperty(msl_info->image[n],"comment"); // No NULL check
...
}
When <comment> appears before any <read> operation, msl_info->image[n] is NULL, causing the assertion failure in DeleteImageProperty() at property.c:297.
This issue was discovered using a custom MSL fuzzer:
#include <cstdint>
#include <Magick++/Blob.h>
#include <Magick++/Image.h>
#include "utils.cc"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
if (IsInvalidSize(Size))
return(0);
try
{
const Magick::Blob blob(Data, Size);
Magick::Image image;
image.magick("MSL");
image.fileName("MSL:");
image.read(blob);
}
catch (Magick::Exception)
{
}
return(0);
}
This issue was found by Team FuzzingBrain @ Texas A&M University
{
"license": "CC-BY-4.0",
"sources": [
{
"imported": "2026-07-30T14:08:44.683Z",
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-23952",
"modified": "2026-06-17T10:22:20.537Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-23952",
"database_specific": {
"status": "Analyzed"
},
"id": "CVE-2026-23952",
"published": "2026-01-22T01:15:52.790Z"
},
{
"html_url": "https://github.com/advisories/GHSA-5vx3-wx4q-6cj8",
"imported": "2026-07-30T14:09:38.835Z",
"modified": "2026-01-21T01:06:53Z",
"url": "https://api.github.com/advisories/GHSA-5vx3-wx4q-6cj8",
"id": "GHSA-5vx3-wx4q-6cj8",
"published": "2026-01-21T01:06:51Z"
},
{
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-3699",
"imported": "2026-07-30T14:08:55.556Z",
"modified": "2026-01-22T21:43:42Z",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-3699",
"id": "EUVD-2026-3699",
"published": "2026-01-22T00:32:52Z"
}
]
}