Loading...
Skip to main content

CVE-2026-23952

MEDIUM

ImageMagick has a NULL pointer dereference in MSL parser via <comment> tag before image load

Published January 21, 2026Updated February 16, 2026Source: osv

Summary

## 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 build_fuzzers imagemagick python3 infra/helper.py reproduce imagemagick msl_fuzzer poc.msl ``` Or run the fuzzer directly: ```bash ./msl_fuzzer 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 `msl_info->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(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`. ## 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 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

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Magick.NET-Q8-x64 to 14.10.2 or later
dotnet add package Magick.NET-Q8-x64 --version 14.10.2
NuGet
Update Magick.NET-Q16-HDRI-OpenMP-x64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-HDRI-OpenMP-x64 --version 14.10.2
NuGet
Update Magick.NET-Q8-AnyCPU to 14.10.2 or later
dotnet add package Magick.NET-Q8-AnyCPU --version 14.10.2
NuGet
Update Magick.NET-Q16-HDRI-OpenMP-arm64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-HDRI-OpenMP-arm64 --version 14.10.2
NuGet
Update Magick.NET-Q16-OpenMP-arm64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-OpenMP-arm64 --version 14.10.2
NuGet
Update Magick.NET-Q16-HDRI-arm64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-HDRI-arm64 --version 14.10.2
NuGet
Update Magick.NET-Q8-x86 to 14.10.2 or later
dotnet add package Magick.NET-Q8-x86 --version 14.10.2
NuGet
Update Magick.NET-Q16-x86 to 14.10.2 or later
dotnet add package Magick.NET-Q16-x86 --version 14.10.2
NuGet
Update Magick.NET-Q16-OpenMP-x86 to 14.10.2 or later
dotnet add package Magick.NET-Q16-OpenMP-x86 --version 14.10.2
NuGet
Update Magick.NET-Q16-arm64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-arm64 --version 14.10.2
NuGet
Update Magick.NET-Q8-OpenMP-x64 to 14.10.2 or later
dotnet add package Magick.NET-Q8-OpenMP-x64 --version 14.10.2
NuGet
Update Magick.NET-Q16-HDRI-x64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-HDRI-x64 --version 14.10.2
NuGet
Update Magick.NET-Q8-arm64 to 14.10.2 or later
dotnet add package Magick.NET-Q8-arm64 --version 14.10.2
NuGet
Update Magick.NET-Q16-HDRI-x86 to 14.10.2 or later
dotnet add package Magick.NET-Q16-HDRI-x86 --version 14.10.2
NuGet
Update Magick.NET-Q8-OpenMP-arm64 to 14.10.2 or later
dotnet add package Magick.NET-Q8-OpenMP-arm64 --version 14.10.2
NuGet
Update Magick.NET-Q16-AnyCPU to 14.10.2 or later
dotnet add package Magick.NET-Q16-AnyCPU --version 14.10.2
NuGet
Update Magick.NET-Q16-OpenMP-x64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-OpenMP-x64 --version 14.10.2
NuGet
Update Magick.NET-Q16-x64 to 14.10.2 or later
dotnet add package Magick.NET-Q16-x64 --version 14.10.2
NuGet
Update Magick.NET-Q16-HDRI-AnyCPU to 14.10.2 or later
dotnet add package Magick.NET-Q16-HDRI-AnyCPU --version 14.10.2

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (19)

PackageEcosystemAffectedFixed In
Magick.NET-Q8-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+220 more)14.10.2
Magick.NET-Q16-HDRI-OpenMP-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+101 more)14.10.2
Magick.NET-Q8-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+204 more)14.10.2
Magick.NET-Q16-HDRI-OpenMP-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+49 more)14.10.2
Magick.NET-Q16-OpenMP-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+49 more)14.10.2
Magick.NET-Q16-HDRI-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+49 more)14.10.2
Magick.NET-Q8-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+220 more)14.10.2
Magick.NET-Q16-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+220 more)14.10.2
Magick.NET-Q16-OpenMP-x86
nuget
All versions14.10.2
Magick.NET-Q16-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+49 more)14.10.2
Magick.NET-Q8-OpenMP-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+101 more)14.10.2
Magick.NET-Q16-HDRI-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+201 more)14.10.2
Magick.NET-Q8-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+49 more)14.10.2
Magick.NET-Q16-HDRI-x86
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+201 more)14.10.2
Magick.NET-Q8-OpenMP-arm64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+49 more)14.10.2
Magick.NET-Q16-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+204 more)14.10.2
Magick.NET-Q16-OpenMP-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+101 more)14.10.2
Magick.NET-Q16-x64
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+220 more)14.10.2
Magick.NET-Q16-HDRI-AnyCPU
nuget
10.0.0, 10.1.0, 11.0.0, 11.1.0 (+201 more)14.10.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-476
    NULL Pointer DereferenceMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Frequently Asked Questions

What is CVE-2026-23952?
ImageMagick has a NULL pointer dereference in MSL parser via <comment> tag before image load This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2026-23952?
CVE-2026-23952 affects Magick.NET-Q8-x64, Magick.NET-Q16-HDRI-OpenMP-x64 and Magick.NET-Q8-AnyCPU (and 16 more). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-23952 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.5

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-5vx3-wx4q-6cj8

Related CVEs

  • CVE-2026-25968
    HIGH

    ImageMagick: MSL attribute stack buffer overflow leads to out of bounds write.

  • CVE-2026-25965
    HIGH

    ImageMagick: Policy bypass through path traversal allows reading restricted content despite secured policy

  • CVE-2026-25987
    MEDIUM

    ImageMagick has a heap buffer over-read in its MAP image decoder

  • CVE-2026-25637
    MEDIUM

    ImageMagick: Possible memory leak in ASHLAR encoder

  • CVE-2026-26283
    MEDIUM

    ImageMagick has a possible infinite loop in its JPEG encoder when using `jpeg:extent`

  • CVE-2026-45624
    MEDIUM

    ImageMagick: Heap Buffer Over-Read of a 4 bytes in distort operation.

  • CVE-2026-26066
    MEDIUM

    ImageMagick has infinite loop when writing IPTCTEXT leads to denial of service via crafted profile

  • CVE-2026-56362
    LOW

    ImageMagick: Heap-based Buffer Overflow in GetPixelIndex due to metadata-cache desynchronization

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies