Skip to content
Fencer Intel
medium 5.5

CVE-2021-20176 json

A divide-by-zero flaw was found in ImageMagick 6.9.11-57 and 7.0.10-57 in gem.c.

published 5y ago modified 3mo ago also EUVD-2021-7633 , JLSEC-2026-877

cvss
5.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.9%
EPSS 0.9% chance of exploitation in 30 days, percentile 61%
public exploits
0
none known

Summary

A divide-by-zero flaw was found in ImageMagick 6.9.11-57 and 7.0.10-57 in gem.c. This flaw allows an attacker who submits a crafted file that is processed by ImageMagick to trigger undefined behavior through a division by zero. The highest threat from this vulnerability is to system availability.

Patch / fix

  • julia ImageMagick_jll 6.9.12+0
  • imagemagick imagemagick 6.9.11-57, 7.0.10-56
  • imagemagick Debian 14, Debian 13, Debian 12 8:6.9.11.57+dfsg-1

debian advisories DEBIAN-CVE-2021-20176

  • imagemagick Ubuntu 18.04 LTS 8:6.9.7.4+dfsg-16ubuntu6.11
  • imagemagick Ubuntu 20.04 LTS 8:6.9.10.23+dfsg-2.1ubuntu11.4
  • imagemagick Ubuntu Pro 14.04 LTS 8:6.7.7.10-6ubuntu3.13+esm12
  • imagemagick Ubuntu Pro 16.04 LTS 8:6.8.9.9-7ubuntu5.16+esm2

ubuntu advisories UBUNTU-CVE-2021-20176

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • ImageMagick SLE Module for Development Tools 15 SP3, SLE Module for Development Tools 15 SP2, SLE Module for Desktop Applications 15 SP3 +1 more 7.0.7.34-10.18.1
  • ImageMagick SLES for SAP 12 SP5, SLES 12 SP5, SLE Workstation Extension 12 SP5 +1 more 6.8.8.1-71.159.2
  • ImageMagick SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLE High Performance Computing 15 SP1-LTSS 7.0.7.34-150000.3.123.1

suse advisories SUSE-SU-2023:4634-1SUSE-SU-2021:3996-1SUSE-SU-2021:0528-1

  • ImageMagick openSUSE Leap 15.2 7.0.7.34-lp152.12.18.1
  • ImageMagick openSUSE Leap 15.3 7.0.7.34-10.18.1

opensuse advisories openSUSE-SU-2021:1583-1openSUSE-SU-2021:3996-1

  • imagemagick Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 7.0.10.57-r0

alpine advisories ALPINE-CVE-2021-20176

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2021-20176 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-20176 updated cvss 5.5

ImageMagick: processing crafted file leads to division by zero

  • Red Hat Enterprise Linux 5 ImageMagick Red Hat Enterprise Linux 6 ImageMagick, ImageMagick-c++, ImageMagick-perl Red Hat Enterprise Linux 7 ImageMagick, ImageMagick-c++, ImageMagick-perl
    affected: no fix planned “Out of support scope”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.94% chance of exploitation in the next 30 days, higher than 61% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P
OSV 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
julia ImageMagick_jll
<6.9.12+0
6.9.12+0

Affected products

  • n/a ImageMagick

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.