CVE-2026-40169 ImageMagick: Heap buffer overflow (WRITE) in the YAML and JSON encoders

Medium 6.2 Published Updated

A crafted image triggers a heap buffer overflow in ImageMagick's YAML and JSON encoders, causing a crash.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-40169?

CVE-2026-40169 is a medium-severity memory corruption vulnerability in Imagemagick Imagemagick, published on 13 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-787, CWE-122

Which versions are affected by CVE-2026-40169?

34 open source packages ship an affected version, including Magick.NET-Q16-AnyCPU, Magick.NET-Q16-HDRI-AnyCPU and Magick.NET-Q16-HDRI-OpenMP-arm64. It affects 1 product.

PackageAffectedFixed in
Magick.NET-Q16-AnyCPU NuGetAll versions14.12.0
Magick.NET-Q16-AnyCPU NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-AnyCPU NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-AnyCPU NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-OpenMP-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-OpenMP-arm64 NuGetAll versions14.12.0
28 more packages
Magick.NET-Q16-HDRI-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-x64 NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-x64 NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-x86 NuGetAll versions14.12.0
Magick.NET-Q16-HDRI-x86 NuGetAll versions14.12.0
Magick.NET-Q16-OpenMP-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-OpenMP-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-OpenMP-x64 NuGetAll versions14.12.0
Magick.NET-Q16-OpenMP-x64 NuGetAll versions14.12.0
Magick.NET-Q16-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-arm64 NuGetAll versions14.12.0
Magick.NET-Q16-x64 NuGetAll versions14.12.0
Magick.NET-Q16-x64 NuGetAll versions14.12.0
Magick.NET-Q16-x86 NuGetAll versions14.12.0
Magick.NET-Q16-x86 NuGetAll versions14.12.0
Magick.NET-Q8-AnyCPU NuGetAll versions14.12.0
Magick.NET-Q8-AnyCPU NuGetAll versions14.12.0
Magick.NET-Q8-OpenMP-arm64 NuGetAll versions14.12.0
Magick.NET-Q8-OpenMP-arm64 NuGetAll versions14.12.0
Magick.NET-Q8-OpenMP-x64 NuGetAll versions14.12.0
Magick.NET-Q8-OpenMP-x64 NuGetAll versions14.12.0
Magick.NET-Q8-arm64 NuGetAll versions14.12.0
Magick.NET-Q8-arm64 NuGetAll versions14.12.0
Magick.NET-Q8-x64 NuGetAll versions14.12.0
Magick.NET-Q8-x64 NuGetAll versions14.12.0
Magick.NET-Q8-x86 NuGetAll versions14.12.0
Magick.NET-Q8-x86 NuGetAll versions14.12.0

Products include Imagemagick Imagemagick.

How do I fix CVE-2026-40169?

Upgrade Magick.NET-Q16-AnyCPU to 14.12.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-40169 being exploited?

There is no known exploitation of CVE-2026-40169 in the wild and no public exploit code.

All Imagemagick Imagemagick vulnerabilities

Sources

Also known as CLSA-2026-1777477457, CLSA-2026-1777478310, DEBIAN-CVE-2026-40169, GHSA-5592-p365-24xh, JLSEC-2026-1000, MINI-rr32-55gr-jpjp and 1 more.

Is CVE-2026-40169 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free