CVE-2019-14981
Description
A divide-by-zero flaw in ImageMagick's MeanShiftImage function allows denial of service via a crafted image file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A divide-by-zero flaw in ImageMagick's MeanShiftImage function allows denial of service via a crafted image file.
Vulnerability
A divide-by-zero vulnerability exists in the MeanShiftImage function in MagickCore/feature.c of ImageMagick 7.x before 7.0.8-41 and 6.x before 6.9.10-41 [1][4]. The function initializes a variable count to zero and later divides by it (gamma=1.0/count). If the inner loop does not increment count (e.g., due to a crafted image causing no iterations), the division by zero triggers a crash [2][3][4].
Exploitation
An attacker can trigger this vulnerability by convincing a user or automated system to open a specially crafted image file with ImageMagick [1]. No special privileges are required; the attack only requires the submitted image to bypass the count increment path in MeanShiftImage. The attacker does not need network position beyond sending the file to the target.
Impact
Successful exploitation results in a denial of service (application crash). The official advisory also notes that other similar malformed image files can lead to arbitrary code execution, but this specific CVE is limited to denial of service [1]. The crash occurs within the process handling the image, potentially affecting any service or user that uses ImageMagick to process untrusted images.
Mitigation
ImageMagick released fixed versions 7.0.8-41 and 6.9.10-41, which replace the direct division with PerceptibleReciprocal(count) to safely handle zero [2][3]. Users should update their ImageMagick installation to these versions or later. For Ubuntu systems, the fix is available via standard package updates (e.g., USN-4192-1) [1]. No workaround is disclosed for unpatched installations.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
8- ImageMagick/ImageMagickdescription
- Range: 7.x <7.0.8-41, 6.x <6.9.10-41
- osv-coords6 versionspkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Leap%2015.0pkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Leap%2015.1pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP1pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP1
< 7.0.7.34-lp150.2.41.1+ 5 more
- (no CPE)range: < 7.0.7.34-lp150.2.41.1
- (no CPE)range: < 7.0.7.34-lp151.7.12.1
- (no CPE)range: < 7.0.7.34-3.72.1
- (no CPE)range: < 7.0.7.34-3.72.1
- (no CPE)range: < 7.0.7.34-3.72.1
- (no CPE)range: < 7.0.7.34-3.72.1
Patches
0No patches discovered yet.
Vulnerability mechanics
No source-code context for this CVE — mechanics is only generated when we can read the actual fix diff. Without that, the four sections (root cause, attack vector, affected code, fix) would be speculation rather than analysis.
References
9- lists.opensuse.org/opensuse-security-announce/2019-11/msg00040.htmlmitrevendor-advisoryx_refsource_SUSE
- lists.opensuse.org/opensuse-security-announce/2019-11/msg00042.htmlmitrevendor-advisoryx_refsource_SUSE
- usn.ubuntu.com/4192-1/mitrevendor-advisoryx_refsource_UBUNTU
- www.debian.org/security/2020/dsa-4712mitrevendor-advisoryx_refsource_DEBIAN
- github.com/ImageMagick/ImageMagick/commit/a77d8d97f5a7bced0468f0b08798c83fb67427bcmitrex_refsource_MISC
- github.com/ImageMagick/ImageMagick/issues/1552mitrex_refsource_MISC
- github.com/ImageMagick/ImageMagick6/commit/b522d2d857d2f75b659936b59b0da9df1682c256mitrex_refsource_MISC
- lists.debian.org/debian-lts-announce/2019/10/msg00028.htmlmitremailing-listx_refsource_MLIST
- lists.debian.org/debian-lts-announce/2020/08/msg00030.htmlmitremailing-listx_refsource_MLIST
News mentions
0No linked articles in our index yet.