CVE-2026-40169

ImageMagick: Heap buffer overflow (WRITE) in the YAML and JSON encoders

Published Apr 13, 2026 CVSS 3.1 · 6.2 Medium EPSS < 1% KEV · Not listed
Description
ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, a crafted image could result in an out of bounds heap write when writing a yaml or json output, resulting in a crash. This issue has been fixed in version 7.1.2-19.

Analysis

AI-generated

Technical impact

ImageMagick versions prior to 7.1.2-19 contain a heap overflow that is triggered when the YAML or JSON encoder processes a specially crafted image, causing an out‑of‑bounds heap write and leading to a crash of the running process. This manifests as a denial of service for any service or application relying on those encoders.

Affected Systems

The vulnerability affects the ImageMagick software distributed by ImageMagick:ImageMagick. All releases older than 7.1.2-19 are vulnerable; the issue was fixed in version 7.1.2-19 and later. Administrators should verify the exact version installed on their systems.

Risk and Exploitability

The base score of 6.2 indicates moderate severity. No additional exploitation probability data is available, and it is not listed in the known exploited vulnerabilities catalog. The likely attack vector is the feeding of a malicious image to an application that invokes the YAML or JSON output feature, which is inferred from the description. Successful exploitation requires the attacker to have control over an image that will be processed by the encoder; it does not provide privilege escalation or data exfiltration beyond service disruption.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade ImageMagick to 7.1.2-19 or newer.
  • Verify the installed version on all affected systems.
  • Ensure that no older ImageMagick libraries remain in the environment.
  • If an upgrade cannot be performed immediately, restrict the use of the YAML and JSON encoders to trusted images only.

Generated by OpenCVE AI on April 13, 2026 at 23:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-6240-1 imagemagick security update
Github GHSA Github GHSA GHSA-5592-p365-24xh ImageMagick has a heap buffer overflow (WRITE) in the YAML and JSON encoders.
History
Type Values Removed Values Added
CPEs cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Imagemagick
Imagemagick imagemagick
Vendors & Products Imagemagick
Imagemagick imagemagick
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, a crafted image could result in an out of bounds heap write when writing a yaml or json output, resulting in a crash. This issue has been fixed in version 7.1.2-19.
Title ImageMagick: Heap buffer overflow (WRITE) in the YAML and JSON encoders
Weaknesses CWE-122
CWE-787
References
Metrics cvssV3_1

{'score': 6.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 14, 2026, 3:52 PM
Reserved
Apr 9, 2026, 7:31 PM
Status
Analyzed
Published
Apr 13, 2026, 10:16 PM
Modified
Jun 17, 2026, 10:44 AM
Severity
Moderate
Public date
Apr 13, 2026, 9:25 PM