CVE-2021-20309
ImageMagick vulnerability analysis and mitigation

Overview

A division by zero vulnerability was discovered in ImageMagick versions before 7.0.11 and before 6.9.12. The vulnerability, identified as CVE-2021-20309, exists in the WaveImage() function of MagickCore/visual-effects.c. This flaw could be triggered when processing a specially crafted image file submitted to an application using ImageMagick (Ubuntu Security, Debian LTS).

Technical details

The vulnerability is caused by a division by zero condition in the WaveImage() function located in MagickCore/visual-effects.c. The issue has been assigned a CVSS 3.1 base score of 7.5 (High), with the following vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The attack vector is network-accessible, requires low complexity to exploit, needs no privileges or user interaction, and primarily impacts system availability (Ubuntu Security).

Impact

The primary impact of this vulnerability is to system availability. When successfully exploited, the division by zero condition can trigger undefined behavior in the application, potentially leading to application crashes or denial of service conditions (Red Hat Bugzilla, Ubuntu Security).

Mitigation and workarounds

The vulnerability has been fixed in ImageMagick versions 7.0.11 and 6.9.12. Users are advised to upgrade to these or later versions. The fix has been backported to various Linux distributions including Ubuntu, Debian, and others. The patches are available in the upstream repositories through commits f1e68d22d1b35459421710587a0dcbab6900b51f (ImageMagick6) and 94174beff065cb5683d09d79e992c3ebbdead311 (ImageMagick) (Red Hat Bugzilla).

Additional resources


SourceThis report was generated using AI

Related ImageMagick vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-57807CRITICAL9.8
  • C#C#
  • ImageMagick-config-7-upstream-open
NoYesSep 05, 2025
CVE-2025-66628HIGH7.5
  • C#C#
  • seal-ImageMagick
NoYesDec 10, 2025
CVE-2025-62171HIGH7.5
  • C#C#
  • ImageMagick-config-7-upstream-websafe
NoYesOct 17, 2025
CVE-2025-62594MEDIUM5.5
  • C#C#
  • libMagickWand-7_Q16HDRI10-32bit
NoYesOct 27, 2025
CVE-2025-65955MEDIUM4.9
  • C#C#
  • Magick.NET-Q16-AnyCPU
NoYesDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management