CVE-2026-40312: ImageMagick: Off-by-One in MSL decoder could result in crash
An off by one error in de MSL decoder could result in a crash when a malicous msl file is read.
Other sources
ImageMagick is free and open-source software used for editing and manipulating digital images. In versions below 7.1.2-19, an off by one error in the MSL decoder could result in a crash when a malicous MSL file is read. This issue has been fixed in version 7.1.2-19.
— MITRE
ImageMagick: Off-by-One in MSL decoder could result in crash
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
nuget/Magick.NET-Q8-x86to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q8-x64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q8-arm64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q8-OpenMP-x64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q8-OpenMP-arm64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q8-AnyCPUto a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-x86to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-x64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-arm64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-OpenMP-x64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-OpenMP-arm64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-HDRI-x86to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-HDRI-x64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-HDRI-arm64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-HDRI-OpenMP-arm64to a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-HDRI-AnyCPUto a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
nuget/Magick.NET-Q16-AnyCPUto a version that resolves this vulnerability.Fixed in 14.12.0 - Upgrade
Upgrade
alpine/imagemagickto a version that resolves this vulnerability.Fixed in 7.1.2.19-r0 - Upgrade
Upgrade
debian/imagemagickto a version that resolves this vulnerability.Fixed in 8:6.9.11.60+dfsg-1.6+deb12u11Fixed in 8:6.9.11.60+dfsg-1.6+deb12u15Fixed in 8:7.1.1.43+dfsg1-1+deb13u12Fixed in 8:7.1.1.43+dfsg1-1+deb13u14Fixed in 8:7.1.2.34+dfsg1-1Fixed in 8:7.1.2.35+dfsg1-2 - Upgrade
Upgrade
azurelinux/ImageMagickto a version that resolves this vulnerability.Fixed in 1:7.1.2.32-6.azl4 - Upgrade
Upgrade
ImageMagickto a version that resolves this vulnerability.Fixed in 7.1.2-19
Event History
Frequently Asked Questions
What is the severity of CVE-2026-40312?
CVE-2026-40312 is considered a moderate severity vulnerability due to its potential to cause application crashes.
How do I fix CVE-2026-40312?
To fix CVE-2026-40312, upgrade ImageMagick to version 7.1.2-19 or later.
What type of vulnerability is CVE-2026-40312?
CVE-2026-40312 is an off-by-one error vulnerability in the MSL decoder.
Which versions of ImageMagick are affected by CVE-2026-40312?
ImageMagick versions prior to 7.1.2-19 are affected by CVE-2026-40312.
What may happen when CVE-2026-40312 is exploited?
Exploitation of CVE-2026-40312 could result in a crash of the ImageMagick application.