CVE-2021-40211
ImageMagick vulnerability analysis and mitigation

Overview

CVE-2021-40211 is a vulnerability discovered in ImageMagick version 7.1.0-4, specifically affecting the ReadEnhMetaFile function in coders/emf.c. The vulnerability was disclosed on August 21, 2021, and affects the ImageMagick image display and manipulation tool (GitHub Issue).

Technical details

The vulnerability is a division by zero error that occurs in the ReadEnhMetaFile function of coders/emf.c. The issue arises when the pBits variable, which can be controlled by an attacker, is used as a divisor. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

The vulnerability can lead to a denial of service (DoS) condition when exploited. The impact is primarily on availability, with no direct effect on confidentiality or integrity of the system (Red Hat Security).

Mitigation and workarounds

Multiple vendors have released patches to address this vulnerability. Red Hat has released security updates for affected versions in RHEL 7 systems. Ubuntu has also provided fixes across multiple releases including 23.04, 22.04 LTS, 20.04 LTS, and earlier versions (Ubuntu Security, Red Hat Advisory).

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#
  • Magick.NET-Q8-x64
NoYesSep 05, 2025
CVE-2025-57803HIGH8.8
  • C#C#
  • libMagick++-devel-32bit
NoYesAug 26, 2025
CVE-2025-62171HIGH7.5
  • C#C#
  • ImageMagick-config-7-upstream-limited
NoYesOct 17, 2025
CVE-2025-62594MEDIUM5.5
  • C#C#
  • ImageMagick
NoYesOct 27, 2025
CVE-2025-65955MEDIUM4.9
  • C#C#
  • imagemagick
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