CVE-2022-3213
Description
A heap buffer overflow in ImageMagick's TIFF processing can cause a denial of service when a malformed file is opened.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A heap buffer overflow in ImageMagick's TIFF processing can cause a denial of service when a malformed file is opened.
Vulnerability
A heap buffer overflow vulnerability exists in ImageMagick's ReadTIFFImage function when processing malformed TIFF files. The bug was introduced because the memory allocation for strip_pixels used a formula that did not account for the image bit depth: extent=4*(samples_per_pixel+1)*TIFFStripSize(tiff) [3][4]. This can lead to an undersized buffer when, for example, the image depth exceeds 8 bits per sample. The issue affects ImageMagick versions prior to the commit fix in both the ImageMagick6 [3] and ImageMagick7 [4] repositories. No specific version number was disclosed in the available references, but the fix was committed on an unspecified date before the CVE publication on 2022-09-19 [1][2].
Exploitation
An attacker needs only to craft a malicious TIFF file with specially chosen parameters that trigger the heap buffer overflow when the file is processed by an application using ImageMagick. No special network position or authentication is required; the vulnerability can be triggered by any user or process that causes ImageMagick to parse the malformed TIFF file (e.g., via image upload, thumbnail generation, or command-line invocation). The exact exploitation steps involve providing a malformed TIFF that leads to a heap buffer overflow in the stripped TIFF conversion path [3][4].
Impact
A successful exploit results in a heap buffer overflow, which can cause undefined behavior, including application crashes, leading to a denial of service. The available references do not provide evidence of achieving code execution or information disclosure; the impact is limited to instability and denial of service as stated in the description [1][2].
Mitigation
The issue is fixed by the commits 1aea203eb36409ce6903b9e41fe7cb70030e8750 (ImageMagick6) [3] and 30ccf9a0da1f47161b5935a95be854fe84e6c2a2 (ImageMagick7) [4], which adjust the extent calculation to include the image depth factor: extent=4*((image->depth+7)/8)*(samples_per_pixel+1)*TIFFStripSize(tiff). Users should update to a version of ImageMagick that includes this fix or apply the patch. No workaround was disclosed in the available references. Red Hat assigned a medium severity and closed the associated Bugzilla as NOTABUG [2], indicating that they did not consider this a security vulnerability in their product, but the upstream project addressed it as a bug fix.
AI Insight generated on May 27, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
5- osv-coords4 versionspkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Tumbleweedpkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Desktop%20Applications%2015%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP4
< 7.1.0.9-150400.6.9.1+ 3 more
- (no CPE)range: < 7.1.0.9-150400.6.9.1
- (no CPE)range: < 7.1.1.17-1.1
- (no CPE)range: < 7.1.0.9-150400.6.9.1
- (no CPE)range: < 7.1.0.9-150400.6.9.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
4- access.redhat.com/security/cve/CVE-2022-3213mitrex_refsource_MISC
- bugzilla.redhat.com/show_bug.cgimitrex_refsource_MISC
- github.com/ImageMagick/ImageMagick/commit/30ccf9a0da1f47161b5935a95be854fe84e6c2a2mitrex_refsource_MISC
- github.com/ImageMagick/ImageMagick6/commit/1aea203eb36409ce6903b9e41fe7cb70030e8750mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.