CVE-2026-23952: ImageMagick has a NULL pointer dereference in MSL parser via <comment> tag before image load

Published Jan 21, 2026
·
Updated

Summary

NULL pointer dereference in MSL (Magick Scripting Language) parser when processing <comment> tag before any image is loaded.

Version

- ImageMagick 7.x (tested on current main branch) - Commit: HEAD

Steps to Reproduce

Method 1: Using ImageMagick directly

bash magick MSL:poc.msl out.png

Method 2: Using OSS-Fuzz reproduce

bash python3 infra/helper.py buildfuzzers imagemagick python3 infra/helper.py reproduce imagemagick mslfuzzer poc.msl

Or run the fuzzer directly: bash ./mslfuzzer poc.msl

Expected Behavior

ImageMagick should handle the malformed MSL gracefully and return an error message.

Actual Behavior

convert: MagickCore/property.c:297: MagickBooleanType DeleteImageProperty(Image , const char ): Assertion image != (Image ) NULL' failed. Aborted

Root Cause Analysis

In coders/msl.c:7091, MSLEndElement() calls DeleteImageProperty() on mslinfo->image[n] when handling the </comment> end tag without checking if the image is NULL:

c if (LocaleCompare((const char ) tag,"comment") == 0 ) { (void) DeleteImageProperty(mslinfo->image[n],"comment"); // No NULL check ... }

When <comment> appears before any <read> operation, mslinfo->image[n] is NULL, causing the assertion failure in DeleteImageProperty() at property.c:297.

Impact

- DoS: Crash via assertion failure (debug builds) or NULL pointer dereference (release builds) - Affected: Any application using ImageMagick to process user-supplied MSL files

Fuzzer

This issue was discovered using a custom MSL fuzzer:

cpp #include <cstdint> #include <Magick++/Blob.h> #include <Magick++/Image.h> #include "utils.cc"

extern "C" int LLVMFuzzerTestOneInput(const uint8t Data, sizet 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

Other sources

ImageMagick is free and open-source software used for editing and manipulating digital images. Versions 14.10.1 and below have a NULL pointer dereference vulnerability in the MSL (Magick Scripting Language) parser when processing <comment> tags before images are loaded. This can lead to DoS attack due to assertion failure (debug builds) or NULL pointer dereference (release builds). This issue is fixed in version 14.10.2.

MITRE

Affected Software

20 affected componentsFixes available
nuget/Magick.NET-Q16-HDRI-AnyCPU<14.10.2
14.10.2
nuget/Magick.NET-Q16-AnyCPU<14.10.2
14.10.2
nuget/Magick.NET-Q8-AnyCPU<14.10.2
14.10.2
nuget/Magick.NET-Q16-HDRI-OpenMP-arm64<14.10.2
14.10.2
nuget/Magick.NET-Q16-HDRI-OpenMP-x64<14.10.2
14.10.2
nuget/Magick.NET-Q16-HDRI-x86<14.10.2
14.10.2
nuget/Magick.NET-Q16-HDRI-arm64<14.10.2
14.10.2
nuget/Magick.NET-Q16-HDRI-x64<14.10.2
14.10.2
nuget/Magick.NET-Q16-OpenMP-x86<14.10.2
14.10.2
nuget/Magick.NET-Q16-OpenMP-arm64<14.10.2
14.10.2
nuget/Magick.NET-Q16-OpenMP-x64<14.10.2
14.10.2
nuget/Magick.NET-Q16-x86<14.10.2
14.10.2
nuget/Magick.NET-Q16-arm64<14.10.2
14.10.2
nuget/Magick.NET-Q8-OpenMP-arm64<14.10.2
14.10.2
nuget/Magick.NET-Q8-OpenMP-x64<14.10.2
14.10.2
nuget/Magick.NET-Q8-x86<14.10.2
14.10.2
nuget/Magick.NET-Q8-arm64<14.10.2
14.10.2
ImageMagick ImageMagick<6.9.13-38
ImageMagick ImageMagick>=7.0.0-0<7.1.2-13
Dlemstra Magick.net<14.10.2

Event History

Jan 21, 2026
Advisory Published
via GitHub·01:06 AM
Data Sourced
via GitHub·01:06 AM
DescriptionSeverityWeaknessAffected Software
Jan 22, 2026
CVE Published
via MITRE·12:32 AM
Data Sourced
via MITRE·12:32 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-23952?

CVE-2026-23952 has been classified as a high severity vulnerability due to the potential for a NULL pointer dereference.

2

How do I fix CVE-2026-23952?

To mitigate CVE-2026-23952, upgrade to Magick.NET version 14.10.2 or later.

3

Which versions of ImageMagick are affected by CVE-2026-23952?

CVE-2026-23952 affects all versions of ImageMagick 7.x up to version 14.10.2.

4

What type of vulnerability is CVE-2026-23952?

CVE-2026-23952 is a NULL pointer dereference vulnerability found in the MSL parser.

5

How can I determine if I'm using an affected version related to CVE-2026-23952?

Check your ImageMagick or Magick.NET package version to see if it is below version 14.10.2 to determine if you are affected by CVE-2026-23952.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203