ImageMagick has a heap-buffer-overflowGHSA-fff3-4rp7-px97
LOWGHSA-fff3-4rp7-px97 is a low-severity (CVSS 3.3) CWE-122 vulnerability in Magick.NET-Q16-AnyCPU. A fix is available for Magick.NET-Q16-AnyCPU — see the affected versions and patch details below.
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fff3-4rp7-px97.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
Magick.NET-Q16-AnyCPU.NETMagick.NET-Q16-HDRI-AnyCPU.NETMagick.NET-Q16-HDRI-OpenMP-arm64.NETMagick.NET-Q16-HDRI-OpenMP-x64.NETMagick.NET-Q16-HDRI-arm64.NETMagick.NET-Q16-HDRI-x64.NETMagick.NET-Q16-HDRI-x86.NETMagick.NET-Q16-OpenMP-arm64+10 moreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.
Description
Summary
While Processing a crafted TIFF file, imagemagick crashes.
Details
Following is the imagemagick version:
imagemagick_git/build_26jun23/bin/magick --version
Version: ImageMagick 7.1.1-13 (Beta) Q16-HDRI x86_64 56f478940:20230625 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI
Delegates (built-in): fontconfig freetype jbig jng jpeg lcms lzma pangocairo png tiff webp x xml zlib
Compiler: gcc (4.2)
PoC
issue can be replicated with following command with provided POC file(sent over email):
magick poc.tiff /dev/null
Impact
This can lead to application crash.
Credits
Please give credits to Hardik shah of Vehere (Dawn Treaders team)
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| .NETNuGet | Magick.NET-Q16-AnyCPU | all versions | 13.2.0dotnet add package Magick.NET-Q16-AnyCPU --version 13.2.0 |
| .NETNuGet | Magick.NET-Q16-HDRI-AnyCPU | all versions | 13.2.0dotnet add package Magick.NET-Q16-HDRI-AnyCPU --version 13.2.0 |
| .NETNuGet | Magick.NET-Q16-HDRI-OpenMP-arm64 | all versions | 13.2.0dotnet add package Magick.NET-Q16-HDRI-OpenMP-arm64 --version 13.2.0 |
| .NETNuGet | Magick.NET-Q16-HDRI-OpenMP-x64 | all versions | 13.2.0dotnet add package Magick.NET-Q16-HDRI-OpenMP-x64 --version 13.2.0 |
| .NETNuGet | Magick.NET-Q16-HDRI-arm64 | all versions | 13.2.0dotnet add package Magick.NET-Q16-HDRI-arm64 --version 13.2.0 |
| .NETNuGet | Magick.NET-Q16-HDRI-x64 | all versions | 13.2.0dotnet add package Magick.NET-Q16-HDRI-x64 --version 13.2.0 |
Affected Products
imagemagickimagemagickDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for Magick.NET-Q16-AnyCPU, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update Magick.NET-Q16-AnyCPU to 13.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fff3-4rp7-px97 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
To exploit this issue, an attacker needs to convince a user to process a crafted TIFF file with ImageMagick. Additionally, this vulnerability can cause a heap-based buffer overflow, but there is no evidence of memory corruption or code execution, limiting the impact to an application crash. Due to these reasons, this…
To mitigate this issue, avoid processing untrusted TIFF files with ImageMagick. In environments where ImageMagick processes files automatically, ensure that all input files originate from trusted sources or implement strict input validation to prevent the processing of malicious TIFF files.Source: Red Hat security advisory for GHSA-fff3-4rp7-px97 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-fff3-4rp7-px97 in your dependencies?
Find it across NuGet, including transitive dependencies.