Advisory Database
  • Advisories
  • Dependency Scanning
  1. nuget
  2. ›
  3. Magick.NET-Q16-HDRI-OpenMP-x64
  4. ›
  5. CVE-2025-62594

CVE-2025-62594: ImageMagick CLAHE : Unsigned underflow and division-by-zero lead to OOB pointer arithmetic and process crash (DoS)

October 27, 2025

A single root cause in the CLAHE implementation — tile width/height becoming zero — produces two distinct but related unsafe behaviors. Vulnerabilities exists in the CLAHEImage() function of ImageMagick’s MagickCore/enhance.c.

  1. Unsigned integer underflow → out-of-bounds pointer arithmetic (OOB): when tile_info.height == 0, the expression tile_info.height - 1 (unsigned) wraps to a very large value; using that value in pointer arithmetic yields a huge offset and OOB memory access (leading to memory corruption, SIGSEGV, or resource exhaustion).
  2. Division/modulus by zero: where code performs ... / tile_info.width or ... % tile_info.height without re-checking for zero, causing immediate division-by-zero crashes under sanitizers or abort at runtime.

Both behaviors are triggered by the same invalid tile condition (e.g., CLI exact -clahe 0x0! or automatic tile derivation dim >> 3 == 0 for very small images).


References

  • github.com/ImageMagick/ImageMagick
  • github.com/ImageMagick/ImageMagick/commit/7b47fe369eda90483402fcd3d78fa4167d3bb129
  • github.com/ImageMagick/ImageMagick/security/advisories/GHSA-wpp4-vqfq-v4hp
  • github.com/advisories/GHSA-wpp4-vqfq-v4hp
  • nvd.nist.gov/vuln/detail/CVE-2025-62594

Code Behaviors & Features

Detect and mitigate CVE-2025-62594 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 14.9.0

Solution

Unfortunately, there is no solution available yet.

Impact 4.7 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-191: Integer Underflow (Wrap or Wraparound)
  • CWE-369: Divide By Zero

Source file

nuget/Magick.NET-Q16-HDRI-OpenMP-x64/CVE-2025-62594.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:25 +0000.