ImageMagick has Division-by-Zero in YUV sampling factor validation, which leads to crash

Description

A logic error in YUV sampling factor validation allows an invalid sampling factor to bypass checks and trigger a division-by-zero during image loading, resulting in a reliable denial-of-service.

coders/yuv.c:210:47: runtime error: division by zero
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3543373==ERROR: AddressSanitizer: UNKNOWN SIGNAL on unknown address 0x000000000000 (pc 0x55deeb4d723c bp 0x7fffc28d34d0 sp 0x7fffc28d3320 T0)
    #0 0x55deeb4d723c in ReadYUVImage coders/yuv.c:210
    #1 0x55deeb751dff in ReadImage MagickCore/constitute.c:743
    #2 0x55deeb756374 in ReadImages MagickCore/constitute.c:1082
    #3 0x55deec682375 in CLINoImageOperator MagickWand/operation.c:4959
    #4 0x55deec6887ed in CLIOption MagickWand/operation.c:5473
    #5 0x55deec32843b in ProcessCommandOptions MagickWand/magick-cli.c:653
    #6 0x55deec32b99b in MagickImageCommand MagickWand/magick-cli.c:1392
    #7 0x55deec324d58 in MagickCommandGenesis MagickWand/magick-cli.c:177
    #8 0x55deead82519 in MagickMain utilities/magick.c:162
    #9 0x55deead828be in main utilities/magick.c:193
    #10 0x7fb90807fd8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #11 0x7fb90807fe3f in __libc_start_main_impl ../csu/libc-start.c:392
    #12 0x55deead81974 in _start (/data/ylwang/LargeScan/targets/ImageMagick/utilities/magick+0x22fb974)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: UNKNOWN SIGNAL coders/yuv.c:210 in ReadYUVImage
==3543373==ABORTING

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-02-24 15:37:53 UTC
Updated
2026-02-24 15:37:56 UTC
GitHub reviewed
2026-02-24 15:37:53 UTC
NVD published
2026-02-23

EPSS Score

Score Percentile
0.02% 5.13%

CVSS Scores

Base score Version Severity Vector
5.3 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.

Identifiers

CWEs

CWE id Name
CWE-369 Divide By Zero

Credits

  • ylwango613 (reporter)

Affected packages (19)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
nuget Magick.NET-Q16-AnyCPU < 14.10.3 14.10.3
nuget Magick.NET-Q16-HDRI-AnyCPU < 14.10.3 14.10.3
nuget Magick.NET-Q16-HDRI-OpenMP-arm64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-HDRI-OpenMP-x64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-HDRI-arm64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-HDRI-x64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-HDRI-x86 < 14.10.3 14.10.3
nuget Magick.NET-Q16-OpenMP-arm64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-OpenMP-x64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-OpenMP-x86 < 14.10.3 14.10.3
nuget Magick.NET-Q16-arm64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-x64 < 14.10.3 14.10.3
nuget Magick.NET-Q16-x86 < 14.10.3 14.10.3
nuget Magick.NET-Q8-AnyCPU < 14.10.3 14.10.3
nuget Magick.NET-Q8-OpenMP-arm64 < 14.10.3 14.10.3
nuget Magick.NET-Q8-OpenMP-x64 < 14.10.3 14.10.3
nuget Magick.NET-Q8-arm64 < 14.10.3 14.10.3
nuget Magick.NET-Q8-x64 < 14.10.3 14.10.3
nuget Magick.NET-Q8-x86 < 14.10.3 14.10.3

References

cvelogic Threat Intelligence