CVE-2021-20311 Denial of service in ImageMagick

High 7.5 Published Updated

An attacker can cause a denial of service via a crafted image file triggering a division by zero in ImageMagick.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-20311?

CVE-2021-20311 is a high-severity denial of service vulnerability in Imagemagick Imagemagick, published on 11 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in ImageMagick in versions before 7.0.11, where a division by zero in sRGBTransformImage() in the MagickCore/colorspace.c may trigger undefined behavior via a crafted image file that is submitted by an attacker processed by an application using ImageMagick. The highest threat from this vulnerability is to system availability.

Weakness: CWE-369

Which versions are affected by CVE-2021-20311?

It affects 1 product.

Products include Imagemagick Imagemagick.

How do I fix CVE-2021-20311?

Upgrade to a fixed version.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-20311 being exploited?

There is no known exploitation of CVE-2021-20311 in the wild and no public exploit code.

All Imagemagick Imagemagick vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-20311, ECHO-f25e-21cb-e4a2, GHSA-3ffh-qhc3-7r9v, JLSEC-2026-886.

Is CVE-2021-20311 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free