CVE-2025-53015

CVE-2025-53015 is a high-severity security vulnerability in Magick.NET-Q8-AnyCPU (nuget), affecting versions < 14.7.0. It is fixed in 14.7.0.

Summary

Infinite lines occur when writing during a specific XMP file conversion command

Details

#0  GetXmpNumeratorAndDenominator (denominator=<optimized out>, numerator=<optimized out>, value=<optimized out>) at MagickCore/profile.c:2578
#1  GetXmpNumeratorAndDenominator (denominator=<synthetic pointer>, numerator=<synthetic pointer>, value=720000000000000) at MagickCore/profile.c:2564
#2  SyncXmpProfile (image=image@entry=0x555555bb9ea0, profile=0x555555b9d020) at MagickCore/profile.c:2605
#3  0x00005555555db5cf in SyncImageProfiles (image=image@entry=0x555555bb9ea0) at MagickCore/profile.c:2651
#4  0x0000555555798d4f in WriteImage (image_info=image_info@entry=0x555555bc2050, image=image@entry=0x555555bb9ea0, exception=exception@entry=0x555555b7bea0) at MagickCore/constitute.c:1288
#5  0x0000555555799862 in WriteImages (image_info=image_info@entry=0x555555bb69c0, images=<optimized out>, images@entry=0x555555bb9ea0, filename=<optimized out>, exception=0x555555b7bea0) at MagickCore/constitute.c:1575
#6  0x00005555559650c4 in CLINoImageOperator (cli_wand=cli_wand@entry=0x555555b85790, option=option@entry=0x5555559beebe "-write", arg1n=arg1n@entry=0x7fffffffe2c7 "a.mng", arg2n=arg2n@entry=0x0) at MagickWand/operation.c:4993
#7  0x0000555555974579 in CLIOption (cli_wand=cli_wand@entry=0x555555b85790, option=option@entry=0x5555559beebe "-write") at MagickWand/operation.c:5473
#8  0x00005555559224aa in ProcessCommandOptions (cli_wand=cli_wand@entry=0x555555b85790, argc=argc@entry=3, argv=argv@entry=0x7fffffffdfa8, index=index@entry=1) at MagickWand/magick-cli.c:758
#9  0x000055555592276d in MagickImageCommand (image_info=image_info@entry=0x555555b824a0, argc=argc@entry=3, argv=argv@entry=0x7fffffffdfa8, metadata=metadata@entry=0x7fffffffbc10, exception=exception@entry=0x555555b7bea0) at MagickWand/magick-cli.c:1392
#10 0x00005555559216a0 in MagickCommandGenesis (image_info=image_info@entry=0x555555b824a0, command=command@entry=0x555555922640 <MagickImageCommand>, argc=argc@entry=3, argv=argv@entry=0x7fffffffdfa8, metadata=0x0, exception=exception@entry=0x555555b7bea0) at MagickWand/magick-cli.c:177
#11 0x000055555559f76b in MagickMain (argc=3, argv=0x7fffffffdfa8) at utilities/magick.c:162
#12 0x00007ffff700fd90 in __libc_start_call_main (main=main@entry=0x55555559aec0 <main>, argc=argc@entry=3, argv=argv@entry=0x7fffffffdfa8) at ../sysdeps/nptl/libc_start_call_main.h:58
#13 0x00007ffff700fe40 in __libc_start_main_impl (main=0x55555559aec0 <main>, argc=3, argv=0x7fffffffdfa8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf98) at ../csu/libc-start.c:392
#14 0x000055555559f535 in _start ()
static void GetXmpNumeratorAndDenominator(double value,
  unsigned long *numerator,unsigned long *denominator)
{
  double
    df;

  *numerator=0;
  *denominator=1;
  if (value <= MagickEpsilon)
    return;
  *numerator=1;
  df=1.0;
  while(fabs(df - value) > MagickEpsilon)
  {
    if (df < value)
      (*numerator)++;
    else
      {
        (*denominator)++;
        *numerator=(unsigned long) (value*(*denominator));
      }
    df=*numerator/(double)*denominator;
  }
}

In this code, the loop while(fabs(df - value) > MagickEpsilon) keeps repeating endlessly.

PoC

magick hang a.mng
https://drive.google.com/file/d/1iegkwlTjqnJTtM4XkiheYsjKsC6pxtId/view?usp=sharing

credits

Team Pay1oad DVE

Reporter : Shinyoung Won (with contributions from WooJin Park, DongHa Lee, JungWoo Park, Woojin Jeon, Juwon Chae, Kyusang Han, JaeHun Gou)

yosimich(@yosiimich) Shinyoung Won of SSA Lab

e-mail : [[email protected]]

Woojin Jeon

Gtihub : brainoverflow

e-mail : [[email protected]]

WooJin Park

GitHub : jin-156

e-mail : [[email protected]]

Who4mI(@GAP-dev) Lee DongHa of SSA Lab

Github: GAP-dev

e-mail : [[email protected]]

JungWoo Park

Github : JungWooJJING

e-mail : [[email protected]]

Juwon Chae

Github : I_mho

e-mail : [[email protected]]

Kyusang Han

Github : T1deSEC

e-mail : [[email protected]]

JaeHun Gou

Github : P2GONE

e-mail : [[email protected]]

Commits

Fixed in: https://github.com/ImageMagick/ImageMagick/commit/229fa96a988a21d78318bbca61245a6ed1ee33a0 and https://github.com/ImageMagick/ImageMagick/commit/38631605e6ab744548a561797472cf8648bcfe26

Impact

XMP profile write triggers hang due to unbounded loop

CVE-2025-53015 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (14.7.0); upgrading removes the vulnerable code path.

Affected versions

Magick.NET-Q8-AnyCPU (< 14.7.0) Magick.NET-Q16-AnyCPU (< 14.7.0) Magick.NET-Q16-HDRI-AnyCPU (< 14.7.0) Magick.NET-Q8-x64 (< 14.7.0) Magick.NET-Q8-arm64 (< 14.7.0) Magick.NET-Q8-x86 (< 14.7.0) Magick.NET-Q8-OpenMP-x64 (< 14.7.0) Magick.NET-Q8-OpenMP-arm64 (< 14.7.0) Magick.NET-Q16-x64 (< 14.7.0) Magick.NET-Q16-arm64 (< 14.7.0) Magick.NET-Q16-x86 (< 14.7.0) Magick.NET-Q16-OpenMP-x64 (< 14.7.0) Magick.NET-Q16-OpenMP-arm64 (< 14.7.0) Magick.NET-Q16-OpenMP-x86 (< 14.7.0) Magick.NET-Q16-HDRI-x64 (< 14.7.0) Magick.NET-Q16-HDRI-arm64 (< 14.7.0) Magick.NET-Q16-HDRI-x86 (< 14.7.0) Magick.NET-Q16-HDRI-OpenMP-x64 (< 14.7.0) Magick.NET-Q16-HDRI-OpenMP-arm64 (< 14.7.0)

Security releases

Magick.NET-Q8-AnyCPU → 14.7.0 (nuget) Magick.NET-Q16-AnyCPU → 14.7.0 (nuget) Magick.NET-Q16-HDRI-AnyCPU → 14.7.0 (nuget) Magick.NET-Q8-x64 → 14.7.0 (nuget) Magick.NET-Q8-arm64 → 14.7.0 (nuget) Magick.NET-Q8-x86 → 14.7.0 (nuget) Magick.NET-Q8-OpenMP-x64 → 14.7.0 (nuget) Magick.NET-Q8-OpenMP-arm64 → 14.7.0 (nuget) Magick.NET-Q16-x64 → 14.7.0 (nuget) Magick.NET-Q16-arm64 → 14.7.0 (nuget) Magick.NET-Q16-x86 → 14.7.0 (nuget) Magick.NET-Q16-OpenMP-x64 → 14.7.0 (nuget) Magick.NET-Q16-OpenMP-arm64 → 14.7.0 (nuget) Magick.NET-Q16-OpenMP-x86 → 14.7.0 (nuget) Magick.NET-Q16-HDRI-x64 → 14.7.0 (nuget) Magick.NET-Q16-HDRI-arm64 → 14.7.0 (nuget) Magick.NET-Q16-HDRI-x86 → 14.7.0 (nuget) Magick.NET-Q16-HDRI-OpenMP-x64 → 14.7.0 (nuget) Magick.NET-Q16-HDRI-OpenMP-arm64 → 14.7.0 (nuget)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

Magick.NET-Q8-AnyCPU to 14.7.0 or later; Magick.NET-Q16-AnyCPU to 14.7.0 or later; Magick.NET-Q16-HDRI-AnyCPU to 14.7.0 or later; Magick.NET-Q8-x64 to 14.7.0 or later; Magick.NET-Q8-arm64 to 14.7.0 or later; Magick.NET-Q8-x86 to 14.7.0 or later; Magick.NET-Q8-OpenMP-x64 to 14.7.0 or later; Magick.NET-Q8-OpenMP-arm64 to 14.7.0 or later; Magick.NET-Q16-x64 to 14.7.0 or later; Magick.NET-Q16-arm64 to 14.7.0 or later; Magick.NET-Q16-x86 to 14.7.0 or later; Magick.NET-Q16-OpenMP-x64 to 14.7.0 or later; Magick.NET-Q16-OpenMP-arm64 to 14.7.0 or later; Magick.NET-Q16-OpenMP-x86 to 14.7.0 or later; Magick.NET-Q16-HDRI-x64 to 14.7.0 or later; Magick.NET-Q16-HDRI-arm64 to 14.7.0 or later; Magick.NET-Q16-HDRI-x86 to 14.7.0 or later; Magick.NET-Q16-HDRI-OpenMP-x64 to 14.7.0 or later; Magick.NET-Q16-HDRI-OpenMP-arm64 to 14.7.0 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-53015? CVE-2025-53015 is a high-severity security vulnerability in Magick.NET-Q8-AnyCPU (nuget), affecting versions < 14.7.0. It is fixed in 14.7.0.
  2. How severe is CVE-2025-53015? CVE-2025-53015 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-53015?
    • Magick.NET-Q8-AnyCPU (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-AnyCPU (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-HDRI-AnyCPU (nuget) (versions < 14.7.0)
    • Magick.NET-Q8-x64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q8-arm64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q8-x86 (nuget) (versions < 14.7.0)
    • Magick.NET-Q8-OpenMP-x64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q8-OpenMP-arm64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-x64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-arm64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-x86 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-OpenMP-x64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-OpenMP-arm64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-OpenMP-x86 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-HDRI-x64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-HDRI-arm64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-HDRI-x86 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-HDRI-OpenMP-x64 (nuget) (versions < 14.7.0)
    • Magick.NET-Q16-HDRI-OpenMP-arm64 (nuget) (versions < 14.7.0)
  4. Is there a fix for CVE-2025-53015? Yes. CVE-2025-53015 is fixed in 14.7.0. Upgrade to this version or later.
  5. Is CVE-2025-53015 exploitable, and should I be worried? Whether CVE-2025-53015 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-53015 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-53015?
    • Upgrade Magick.NET-Q8-AnyCPU to 14.7.0 or later
    • Upgrade Magick.NET-Q16-AnyCPU to 14.7.0 or later
    • Upgrade Magick.NET-Q16-HDRI-AnyCPU to 14.7.0 or later
    • Upgrade Magick.NET-Q8-x64 to 14.7.0 or later
    • Upgrade Magick.NET-Q8-arm64 to 14.7.0 or later
    • Upgrade Magick.NET-Q8-x86 to 14.7.0 or later
    • Upgrade Magick.NET-Q8-OpenMP-x64 to 14.7.0 or later
    • Upgrade Magick.NET-Q8-OpenMP-arm64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-x64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-arm64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-x86 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-OpenMP-x64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-OpenMP-arm64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-OpenMP-x86 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-HDRI-x64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-HDRI-arm64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-HDRI-x86 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-HDRI-OpenMP-x64 to 14.7.0 or later
    • Upgrade Magick.NET-Q16-HDRI-OpenMP-arm64 to 14.7.0 or later

Other vulnerabilities in Magick.NET-Q8-AnyCPU

Stop the waste.
Protect your environment with Kodem.