VYPR
Unrated severityNVD Advisory· Published Jun 26, 2019· Updated Aug 4, 2024

CVE-2019-12976

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

Patches

0

No 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

News mentions

0

No linked articles in our index yet.