CVE-2025-55212: Magick.NET Q16 AnyCPU " Leads To Crash Vulnerability

LOW
Advisory Identifier: GHSA-fh55-q5pj-pxgw
CVSS 3.7
CWE-369
Published
Advisory Summary

CVE-2025-55212 is a LOW (CVSS 3.7) " leads to crash vulnerability (CWE-369: Divide By Zero) affecting Magick.NET Q16 AnyCPU libraries in the NuGet ecosystem. The issue involves " leads to crash. Remediation is available by upgrading affected packages to version 14.8.1.

CVE-2025-55212 at a Glance

CVE Identifier CVE-2025-55212
GHSA Identifier GHSA-fh55-q5pj-pxgw
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-369: Divide By Zero
Affected Product Magick.NET Q16 AnyCPU
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-55212

To remediate this vulnerability, upgrade all affected Magick.NET Q16 AnyCPU dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Magick.NET-Q16-AnyCPU fixed: 14.8.1
Upgrade Magick.NET-Q16-AnyCPU to 14.8.1
Magick.NET-Q16-HDRI-AnyCPU fixed: 14.8.1
Upgrade Magick.NET-Q16-HDRI-AnyCPU to 14.8.1
Magick.NET-Q16-HDRI-OpenMP-arm64 fixed: 14.8.1
Upgrade Magick.NET-Q16-HDRI-OpenMP-arm64 to 14.8.1
Magick.NET-Q16-HDRI-OpenMP-x64 fixed: 14.8.1
Upgrade Magick.NET-Q16-HDRI-OpenMP-x64 to 14.8.1
Magick.NET-Q16-HDRI-arm64 fixed: 14.8.1
Upgrade Magick.NET-Q16-HDRI-arm64 to 14.8.1
Magick.NET-Q16-HDRI-x64 fixed: 14.8.1
Upgrade Magick.NET-Q16-HDRI-x64 to 14.8.1
Magick.NET-Q16-HDRI-x86 fixed: 14.8.1
Upgrade Magick.NET-Q16-HDRI-x86 to 14.8.1
Magick.NET-Q16-OpenMP-arm64 fixed: 14.8.1
Upgrade Magick.NET-Q16-OpenMP-arm64 to 14.8.1
Magick.NET-Q16-OpenMP-x64 fixed: 14.8.1
Upgrade Magick.NET-Q16-OpenMP-x64 to 14.8.1
Magick.NET-Q16-arm64 fixed: 14.8.1
Upgrade Magick.NET-Q16-arm64 to 14.8.1
Magick.NET-Q16-x64 fixed: 14.8.1
Upgrade Magick.NET-Q16-x64 to 14.8.1
Magick.NET-Q16-x86 fixed: 14.8.1
Upgrade Magick.NET-Q16-x86 to 14.8.1
Magick.NET-Q8-AnyCPU fixed: 14.8.1
Upgrade Magick.NET-Q8-AnyCPU to 14.8.1
Magick.NET-Q8-OpenMP-arm64 fixed: 14.8.1
Upgrade Magick.NET-Q8-OpenMP-arm64 to 14.8.1
Magick.NET-Q8-OpenMP-x64 fixed: 14.8.1
Upgrade Magick.NET-Q8-OpenMP-x64 to 14.8.1
Magick.NET-Q8-arm64 fixed: 14.8.1
Upgrade Magick.NET-Q8-arm64 to 14.8.1
Magick.NET-Q8-x64 fixed: 14.8.1
Upgrade Magick.NET-Q8-x64 to 14.8.1
Magick.NET-Q8-x86 fixed: 14.8.1
Upgrade Magick.NET-Q8-x86 to 14.8.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Magick.NET-Q16-AnyCPU

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-55212, inspect your project dependencies for Magick.NET Q16 AnyCPU:

inspect dependencies for Magick.NET-Q16-AnyCPU

Analyze the terminal output to locate any version of Magick.NET Q16 AnyCPU in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.8.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-369: Divide By Zero, where the product divides a value by zero. In Magick.NET Q16 AnyCPU, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Passing a geometry string containing only a colon (":") to montage -geometry leads GetGeometry() to set width/height to 0. Later, ThumbnailImage() divides by these zero dimensions, triggering a crash (SIGFPE/abort), resulting in a denial of service. ## Details **Root Cause** 1. `montage -geometry ":" ...` reaches `MagickCore/geometry.c:GetGeometry().` 2. `StringToDouble/InterpretLocaleValue` parses `":"` as `0.0;` then: https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/geometry.c#L355 `WidthValue` (and/or `HeightValue)` is set with a zero dimension. 3. In MagickCore/resize.c:ThumbnailImage(), the code computes: https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/resize.c#L4625-L4629 causing a division by zero and immediate crash. The issue is trivially triggerable without external input files (e.g., using `xc:white`). ### Reproduction Environment ``` Version: ImageMagick 7.1.2-1 (Beta) Q16-HDRI x86_64 0ba1b587b:20250812 https://imagemagick.org Features: Cipher DPC HDRI Delegates (built-in): bzlib fontconfig freetype jbig jng jpeg lcms lzma pangocairo png tiff x xml zlib Compiler: clang (14.0.0) OS/Arch: Linux x86_64 ``` Steps ``` ./bin/magick montage -geometry : xc:white null: ``` Observed result ``` IOT instruction (core dumped) # (Environment-dependent: SIGFPE/abort may be observed.) ``` ## PoC No external file required; the pseudo image xc:white suffices: ``` ./bin/magick montage -geometry : xc:white null: ``` ## Impact - **Denial of Service:** A divide-by-zero in `ThumbnailImage()` causes immediate abnormal termination (e.g., SIGFPE/abort), crashing the ImageMagick process. ## Suggested fix Defensively reject zero dimensions early in `ThumbnailImage()`: ```c if ((columns == 0) || (rows == 0)) { (void) ThrowMagickException(exception, GetMagickModule(), OptionError, "InvalidGeometry", "thumbnail requires non-zero dimensions: %.20gx%.20g", (double) columns, (double) rows); return (Image *) NULL; } ``` Additionally, consider tightening validation in `GetGeometry()` so that colon-only (and similar malformed) inputs do not yield `WidthValue/HeightValue` with zero, or are rejected outright. Variants like `"x:"` or `":x"` may also need explicit handling (maintainer confirmation requested). ## Credits ### Team Daemon Fuzz Hunters **Bug Hunting Master Program, HSpace/Findthegap** <br> **Woojin Park** @jin-156 [1203kids@gmail.com](mailto:1203kids@gmail.com) **Hojun Lee** @leehohojune [leehojune@korea.ac.kr](mailto:leehojune@korea.ac.kr) **Youngin Won** @amethyst0225 [youngin04@korea.ac.kr](mailto:youngin04@korea.ac.kr) **Siyeon Han** @hanbunny [kokosyeon@gmail.com](mailto:kokosyeon@gmail.com)

CVE-2025-55212 Affected Magick.NET Q16 AnyCPU Versions

18 component(s)
Fixed Versions:
14.8.1
Product / Package Ecosystem Affected Versions Fixed Version
Magick.NET-Q16-AnyCPU
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-HDRI-AnyCPU
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-HDRI-OpenMP-arm64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-HDRI-OpenMP-x64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-HDRI-arm64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-HDRI-x64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-HDRI-x86
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-OpenMP-arm64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-OpenMP-x64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-arm64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-x64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q16-x86
NuGet
< 14.8.1
14.8.1
Magick.NET-Q8-AnyCPU
NuGet
< 14.8.1
14.8.1
Magick.NET-Q8-OpenMP-arm64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q8-OpenMP-x64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q8-arm64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q8-x64
NuGet
< 14.8.1
14.8.1
Magick.NET-Q8-x86
NuGet
< 14.8.1
14.8.1

References

Frequently Asked Questions

What is CVE-2025-55212?
CVE-2025-55212 is a security vulnerability in Magick.NET Q16 AnyCPU involving " leads to crash under CWE-369: Divide By Zero.
Which Magick.NET Q16 AnyCPU versions are affected?
Affected versions include releases prior to 14.8.1 across affected packages: Magick.NET-Q16-AnyCPU, Magick.NET-Q16-HDRI-AnyCPU, Magick.NET-Q16-HDRI-OpenMP-arm64, Magick.NET-Q16-HDRI-OpenMP-x64, Magick.NET-Q16-HDRI-arm64, Magick.NET-Q16-HDRI-x64, Magick.NET-Q16-HDRI-x86, Magick.NET-Q16-OpenMP-arm64, Magick.NET-Q16-OpenMP-x64, Magick.NET-Q16-arm64, Magick.NET-Q16-x64, Magick.NET-Q16-x86, Magick.NET-Q8-AnyCPU, Magick.NET-Q8-OpenMP-arm64, Magick.NET-Q8-OpenMP-x64, Magick.NET-Q8-arm64, Magick.NET-Q8-x64, Magick.NET-Q8-x86.
What version fixes CVE-2025-55212?
Upgrading to 14.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Magick.NET-Q16-AnyCPU affected?
Yes, Magick.NET-Q16-AnyCPU is affected in releases prior to 14.8.1. Upgrade your dependency to 14.8.1 or later.
Is Magick.NET-Q16-HDRI-AnyCPU affected?
Yes, Magick.NET-Q16-HDRI-AnyCPU is affected in releases prior to 14.8.1. Upgrade your dependency to 14.8.1 or later.
What is the CVSS score of CVE-2025-55212?
CVE-2025-55212 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-55212?
CVE-2025-55212 is classified under CWE-369: Divide By Zero (The product divides a value by zero.).
How can I check NuGet dependencies for CVE-2025-55212?
Run the dependency tree command: 'inspect dependencies for Magick.NET-Q16-AnyCPU'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fh55-q5pj-pxgw",
  "modified" : "2025-11-03T21:34:24Z",
  "published" : "2025-08-26T15:27:25Z",
  "aliases" : [ "CVE-2025-55212" ],
  "summary" : "ImageMagick affected by divide-by-zero in ThumbnailImage via montage -geometry \":\" leads to crash",
  "details" : "## Summary\nPassing a geometry string containing only a colon (\":\") to montage -geometry leads GetGeometry() to set width/height to 0. Later, ThumbnailImage() divides by these zero dimensions, triggering a crash (SIGFPE/abort), resulting in a denial of service.\n\n## Details\n**Root Cause**\n1. `montage -geometry \":\" ...` reaches `MagickCore/geometry.c:GetGeometry().`\n2. `StringToDouble/InterpretLocaleValue` parses `\":\"` as `0.0;` then: \nhttps://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/geometry.c#L355\n`WidthValue` (and/or `HeightValue)` is set with a zero dimension.\n3. In MagickCore/resize.c:ThumbnailImage(), the code computes:\nhttps://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/resize.c#L4625-L4629\ncausing a division by zero and immediate crash.\n\nThe issue is trivially triggerable without external input files (e.g., using `xc:white`).\n\n### Reproduction\nEnvironment\n```\nVersion: ImageMagick 7.1.2-1 (Beta) Q16-HDRI x86_64 0ba1b587b:20250812 https://imagemagick.org\nFeatures: Cipher DPC HDRI\nDelegates (built-in): bzlib fontconfig freetype jbig jng jpeg lcms lzma pangocairo png tiff x xml zlib\nCompiler: clang (14.0.0)\nOS/Arch: Linux x86_64\n```\nSteps\n```\n./bin/magick montage -geometry : xc:white null:\n```\nObserved result\n```\nIOT instruction (core dumped)\n# (Environment-dependent: SIGFPE/abort may be observed.)\n```\n\n## PoC\nNo external file required; the pseudo image xc:white suffices:\n```\n./bin/magick montage -geometry : xc:white null:\n```\n\n## Impact\n- **Denial of Service:** A divide-by-zero in `ThumbnailImage()` causes immediate abnormal termination (e.g., SIGFPE/abort), crashing the ImageMagick process.\n\n\n## Suggested fix\nDefensively reject zero dimensions early in `ThumbnailImage()`:\n```c\nif ((columns == 0) || (rows == 0)) {\n  (void) ThrowMagickException(exception, GetMagickModule(), OptionError,\n    \"InvalidGeometry\", \"thumbnail requires non-zero dimensions: %.20gx%.20g\",\n    (double) columns, (double) rows);\n  return (Image *) NULL;\n}\n```\nAdditionally, consider tightening validation in `GetGeometry()` so that colon-only (and similar malformed) inputs do not yield `WidthValue/HeightValue` with zero, or are rejected outright. Variants like `\"x:\"` or `\":x\"` may also need explicit handling (maintainer confirmation requested).\n\n## Credits\n### Team Daemon Fuzz Hunters\n**Bug Hunting Master Program, HSpace/Findthegap**\n<br>\n\n**Woojin Park**\n@jin-156\n[1203kids@gmail.com](mailto:1203kids@gmail.com)\n\n**Hojun Lee**\n@leehohojune \n[leehojune@korea.ac.kr](mailto:leehojune@korea.ac.kr)\n\n**Youngin Won**\n@amethyst0225\n[youngin04@korea.ac.kr](mailto:youngin04@korea.ac.kr)\n\n**Siyeon Han**\n@hanbunny\n[kokosyeon@gmail.com](mailto:kokosyeon@gmail.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-AnyCPU"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-HDRI-AnyCPU"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-HDRI-OpenMP-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-HDRI-OpenMP-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-HDRI-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-HDRI-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-HDRI-x86"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-OpenMP-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-OpenMP-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q16-x86"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q8-AnyCPU"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q8-OpenMP-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q8-OpenMP-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q8-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q8-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Magick.NET-Q8-x86"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "14.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-fh55-q5pj-pxgw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55212"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ImageMagick/ImageMagick/commit/5f0bcf986b8b5e90567750d31a37af502b73f2af"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ImageMagick/ImageMagick"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/geometry.c#L355"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ImageMagick/ImageMagick/blob/0ba1b587be17543b664f7ad538e9e51e0da59d17/MagickCore/resize.c#L4625-L4629"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dlemstra/Magick.NET/releases/tag/14.8.1"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/09/msg00012.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-369" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-26T15:27:25Z",
    "nvd_published_at" : "2025-08-26T17:15:39Z"
  }
}