CVE-2019-12976
Description
ImageMagick 7.0.8-34 has a memory leak in ReadPCLImage when a required delegate is missing, potentially exhausting resources.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
ImageMagick 7.0.8-34 has a memory leak in ReadPCLImage when a required delegate is missing, potentially exhausting resources.
Vulnerability
ImageMagick version 7.0.8-34 contains a memory leak in the ReadPCLImage function located in coders/pcl.c. The issue occurs when the function determines a required delegate (monochrome, CMYK, or color) is unavailable — the code returns a NULL pointer without first destroying the allocated image structure via DestroyImage, leaving that memory orphaned [1].
Exploitation
An attacker needs to provide a PCL image file that triggers the delegate-missing code path. No authentication or special network position is required; the attacker simply supplies a crafted file to an application or service using the vulnerable ImageMagick version to read PCL images [1].
Impact
Repeatedly invoking the vulnerable code path causes a cumulative memory leak, which may lead to denial of service (DoS) by exhausting available memory on the system hosting the vulnerable software. No code execution or information disclosure is reported [1].
Mitigation
The issue was reported on June 21, 2019, and the fix was applied in the ImageMagick codebase shortly after by adding a call to DestroyImage before the return statement. Users should update to a version containing the fix or apply the patch to coders/pcl.c as shown in the reference. No workaround is documented; if updating is not possible, consider restricting processing of untrusted PCL files [1].
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
14- ImageMagick/ImageMagickdescription
- Range: =7.0.8-34
- osv-coords12 versionspkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Leap%2015.0pkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/ImageMagick&distro=openSUSE%20Tumbleweedpkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP4pkg: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%20SP1pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP4pkg:rpm/suse/ImageMagick&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2012%20SP4
< 7.0.7.34-lp151.7.9.1+ 11 more
- (no CPE)range: < 7.0.7.34-lp151.7.9.1
- (no CPE)range: < 7.0.7.34-lp151.7.9.1
- (no CPE)range: < 7.1.0.9-1.1
- (no CPE)range: < 6.8.8.1-71.126.1
- (no CPE)range: < 7.0.7.34-3.67.1
- (no CPE)range: < 7.0.7.34-3.67.1
- (no CPE)range: < 7.0.7.34-3.67.1
- (no CPE)range: < 7.0.7.34-3.67.1
- (no CPE)range: < 6.8.8.1-71.126.1
- (no CPE)range: < 6.8.8.1-71.126.1
- (no CPE)range: < 6.8.8.1-71.126.1
- (no CPE)range: < 6.8.8.1-71.126.1
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"The ReadPCLImage function fails to release allocated image memory when a delegate lookup fails, resulting in a memory leak."
Attack vector
An attacker can trigger this memory leak by providing a specially crafted PCL file to ImageMagick [ref_id=1]. When the application attempts to process this file, the ReadPCLImage function encounters a condition where the required delegate information is unavailable. Because the function returns without properly destroying the image object, the allocated memory is not reclaimed [ref_id=1].
Affected code
The vulnerability is located in the ReadPCLImage function within the coders/pcl.c file [ref_id=1].
What the fix does
The fix involves ensuring that the image object is properly destroyed before the function returns when the delegate lookup fails [ref_id=1]. The patch modifies the error handling logic to call DestroyImage(image) before returning a NULL pointer [ref_id=1]. This ensures that memory associated with the image is correctly deallocated, preventing the leak.
Preconditions
- inputThe attacker must provide a PCL file that triggers a failure in the GetDelegateInfo function.
Generated on Jun 1, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- lists.opensuse.org/opensuse-security-announce/2019-08/msg00069.htmlmitrevendor-advisoryx_refsource_SUSE
- usn.ubuntu.com/4192-1/mitrevendor-advisoryx_refsource_UBUNTU
- www.debian.org/security/2020/dsa-4712mitrevendor-advisoryx_refsource_DEBIAN
- www.securityfocus.com/bid/108913mitrevdb-entryx_refsource_BID
- github.com/ImageMagick/ImageMagick/issues/1520mitrex_refsource_MISC
News mentions
0No linked articles in our index yet.