CVE-2026-56365: ImageMagick PNG Encoder Memory Leak in MNG Processing
ImageMagick versions before 7.1.2-19 contain a memory leak in their PNG encoder when processing MNG (Multiple-image Network Graphics) files. An attacker can craft a malicious MNG image that triggers a failure condition in the encoder, causing the application to leak memory repeatedly. If an ImageMagick instance processes many such images without restarting, available memory will eventually be exhausted, causing the service to become unresponsive or crash—a denial-of-service condition. This is a low-severity issue because it requires specific conditions to be met and does not allow unauthorized access or data compromise.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.7 LOW · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- Weaknesses (CWE)
- CWE-401
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-30 / 2026-07-02
NVD description (verbatim)
ImageMagick before 7.1.2-19 contains a memory leak vulnerability in the PNG encoder when writing MNG images. Attackers can trigger the encoder failure condition to exhaust memory resources and cause denial of service.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-56365 involves improper resource cleanup (CWE-401) in ImageMagick's PNG encoder implementation when writing MNG image formats. The vulnerability manifests as a memory leak triggered during encoder failure scenarios. When the PNG encoder encounters certain crafted MNG inputs, it fails to deallocate memory resources that were allocated during the encoding process. Repeated failures cause cumulative memory consumption until process limits are reached. The issue affects ImageMagick versions prior to 7.1.2-19, where memory cleanup logic was corrected. The attack vector is network-based with no authentication required, but a high complexity factor—specific image characteristics must be present to trigger the leak—limits practical exploitability.
Business impact
The primary business impact is service availability. ImageMagick is widely used in content management systems, web applications, image processing pipelines, and automated workflows. An attacker who can supply crafted MNG files to an exposed ImageMagick instance could degrade or disrupt image processing services. In multi-tenant or SaaS environments where ImageMagick processes user-uploaded content, this could be leveraged to create a denial-of-service condition affecting legitimate users. Organizations heavily reliant on uninterrupted image processing—such as media platforms, e-commerce sites with dynamic imaging, or document conversion services—face the greatest operational risk. Financial impact is limited to downtime and recovery costs rather than data breach or confidentiality loss.
Affected systems
ImageMagick versions before 7.1.2-19 are vulnerable. The issue is specific to the PNG encoder's MNG-writing code path, so systems must both run a vulnerable ImageMagick version and process MNG image files (or accept MNG inputs) to be at risk. Organizations using ImageMagick for general image manipulation may be unaffected if they do not encounter MNG inputs. However, any application that integrates ImageMagick for automated image processing, content transformation, or format conversion—especially those accepting user-supplied files—should be considered in scope. This includes web frameworks with built-in ImageMagick support, image optimization tools, and thumbnail generation services.
Exploitability
Exploitability is rated as low to moderate. While the attack vector is network-accessible and requires no authentication, the attack complexity is high. An attacker must craft a specific MNG image designed to trigger the encoder failure condition; generic or randomly malformed MNG files may not reliably reproduce the leak. The attacker also needs a way to deliver the malicious image to a vulnerable ImageMagick instance—typically by uploading to a web application or service that processes the file. In closed environments where image inputs are strictly controlled or validated, the practical risk is reduced. However, in open platforms accepting user uploads or processing untrusted image sources, the barrier to exploitation is lower.
Remediation
Upgrade ImageMagick to version 7.1.2-19 or later. This version corrects the memory leak in the PNG encoder's MNG handling. Organizations unable to upgrade immediately should implement input validation and filtering to reject or sanitize MNG files, implement resource limits and memory quotas on ImageMagick processes to prevent runaway consumption, and monitor for unusual memory growth patterns in image processing services. If feasible, restrict ImageMagick instances to trusted image sources and disable support for MNG format if it is not required for business operations.
Patch guidance
Verify the version of ImageMagick in use via 'convert -version' or equivalent. For systems running versions before 7.1.2-19, obtain the patched version from the official ImageMagick repository or your distribution's package manager. Test the patch in a non-production environment first to ensure compatibility with existing workflows and dependent applications. After patching, confirm memory behavior during typical workloads and stress-test with MNG files if MNG processing is part of your regular operations. For containerized deployments, rebuild container images with the patched ImageMagick version and redeploy.
Detection guidance
Monitor ImageMagick processes for sustained or rapid memory growth, particularly during image processing operations. Use process monitoring tools (top, htop, or cloud-native observability platforms) to establish baseline memory usage and alert on significant deviations. Collect and analyze ImageMagick error logs for repeated encoder failures or allocation errors. Implement file-type inspection at ingestion points to identify and log MNG file submissions. If possible, enable verbose logging in ImageMagick or use memory profiling tools (valgrind, AddressSanitizer if compiled in) in test environments to confirm leak patterns. Correlate memory exhaustion events with image upload or processing triggers to identify potential attack activity.
Why prioritize this
This vulnerability warrants medium priority for most organizations, despite its low CVSS score. While the attack requires complexity and delivers only denial-of-service impact, the widespread deployment of ImageMagick in production systems and the ease of delivering a malicious file make it a practical risk. Organizations with exposed image upload features, content transformation pipelines, or automated imaging workflows should prioritize patching. The lack of KEV/CISA awareness and absence of active exploitation reports suggest this is not yet a widespread target, providing a window to patch proactively before adoption increases. For organizations with strong availability requirements or multi-tenant architectures, earlier patching is justified.
Risk score, explained
The CVSS 3.1 score of 3.7 (LOW) reflects the attack vector (network-accessible, no authentication) and the denial-of-service outcome, but penalizes for high attack complexity and limited scope (no impact on confidentiality or integrity). This scoring is appropriate and conservative—it acknowledges that while the barrier to triggering the vulnerability is higher than simple network access, the impact on availability is real and can affect production systems. Organizations should not underestimate the score; even low-scoring availability-impacting vulnerabilities merit timely remediation, particularly in services with SLAs or critical business dependencies.
Frequently asked questions
If we do not process MNG image files, are we still vulnerable?
Unlikely, but verify your threat model. The vulnerability is triggered specifically when the PNG encoder attempts to write MNG format. If your ImageMagick usage is limited to common formats (JPEG, PNG, GIF, WebP) and you do not intentionally convert to or output MNG, you are probably not in the code path. However, if your application accepts user-supplied image files and auto-detects format or converts between formats automatically, review your logic to confirm MNG is not being processed.
Does this affect ImageMagick 6.x versions?
The vulnerability description specifies versions before 7.1.2-19, implying the 7.x branch. If your organization runs ImageMagick 6.x (which is in long-term maintenance), verify with the official ImageMagick security advisories or contact the maintainers for confirmation. Different major versions may have different vulnerability exposures.
Can we just disable MNG support in ImageMagick to mitigate?
Possibly, if MNG is not a business requirement. ImageMagick can be compiled or configured to disable certain format handlers. Disabling MNG would eliminate the vulnerable code path, but this requires rebuilding or reconfiguring ImageMagick and should be validated against your application's format needs. Upgrading remains the recommended primary remediation; disabling formats is a secondary defense-in-depth measure.
What is the difference between the CVSS score (3.7) and actual business risk?
CVSS is a standardized technical measure focused on exploitability and impact scope. A score of 3.7 reflects that the attack is complex and the damage is limited to availability. However, business risk depends on context: if your image processing service is critical to your revenue or operations, even a low-scored availability impact can be business-critical. Use CVSS as a baseline, but layer in your own risk assessment based on asset value and operational importance.
This analysis is provided for informational purposes and should not be construed as legal or compliance advice. Organizations are responsible for assessing their own exposure and implementing appropriate remediation based on their security posture, risk tolerance, and business requirements. Patch versions, availability dates, and vendor advisories should be verified directly with ImageMagick maintainers and official sources. This vulnerability has not been added to CISA's KEV catalog as of the publication date; organizations should monitor official channels for any updates to active exploitation status or threat intelligence. Source: NVD (public-domain), retrieved 2026-08-09. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-56364LOWImageMagick OpenCL Memory Leak Vulnerability - Low Severity
- CVE-2026-56366LOWImageMagick Memory Leak in META Reader (APP1JPEG)
- CVE-2026-56368LOWImageMagick Memory Leak Denial of Service Vulnerability
- CVE-2026-53464MEDIUMImageMagick Memory Leak in Wand Option Parser—MEDIUM Severity
- CVE-2026-56371MEDIUMImageMagick Memory Leak in TXT File Processing
- CVE-2026-10699HIGHMOVEit Transfer Memory Leak Denial of Service
- CVE-2026-13474HIGHNetScaler ADC and Gateway HTTP/2 Denial of Service Vulnerability
- CVE-2026-13593MEDIUMCSS::Minifier::XS Memory Leak in Perl Module