Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain low-privileged local/service access
-
DeliverySubmit crafted -fx expression under memory pressure
-
ExploitTrigger reallocation failure in ExtendRPN
-
ExecutionAccess freed/NULL RPN element memory
-
ImpactCrash or corrupt ImageMagick process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Null pointer safety, defensive checks
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an attacker who can supply crafted '-fx' expressions to ImageMagick (the MagickCore fx.c expression evaluator) AND can induce a memory-allocation failure - i.e., the process must be under genuine memory pressure so that the RPN-table reallocation in ExtendRPN fails, which is the AT:P attack requirement in the vector. This is a local, low-privileged path (AV:L/PR:L), so it applies chiefly to services or multi-tenant workers that expose user-controlled -fx input rather than to remote unauthenticated attackers. Limiting factors: the allocation-failure precondition is not attacker-deterministic under normal conditions, only low-severity availability impact results, and local access plus existing privileges are needed. |
| Impact | This is a genuinely low-priority issue, and the signals are consistent rather than conflicting. The vendor-supplied CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:L/UI:N, impact VA:L only) scores just 2.0, reflecting that exploitation requires local access, prior low-level privileges, and a specific attack precondition (AT:P) - namely that a heap allocation must actually fail under memory pressure. The only confirmed impact is a degraded-availability outcome (crash); confidentiality and integrity are rated N by the vendor. There is no CISA KEV listing and no public exploit identified at time of analysis, so there is no evidence of real-world exploitation. One internal inconsistency worth noting: the description characterizes the flaw as a use-after-free with potential 'memory corruption,' which could imply integrity impact, yet both the assigned CWE-476 (NULL pointer dereference) and the vendor VC:N/VI:N scoring treat it as a crash-class defect - the patch (adding a NULL check in AddElement and preserving the old RPN table on realloc failure in ExtendRPN) supports the crash/NULL-deref interpretation over weaponizable corruption. Net: a real bug fixed by the vendor, but not an urgent patch priority outside hardened multi-tenant image-processing contexts. |
| Exploit ScenarioDerived | A local or low-privileged user of a service that passes user-controlled '-fx' expressions to ImageMagick (e.g., a constrained image-processing worker) submits a crafted expression while the process is under memory pressure, causing an RPN-table reallocation to fail and the code to access freed/NULL memory. The result is a crash or potential memory corruption, degrading availability of the processing service. No public proof-of-concept exploit has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 12, 2026
ImageMagick 7.1.0-20 through 7.1.2-31 can crash or corrupt memory through a use-after-free in the MagickCore -fx expression evaluator, which is reached when the internal RPN element table must grow and the underlying memory allocation fails. Exploitation is constrained: it requires a local, low-privileged caller who can supply crafted -fx expressions to a process that is simultaneously under genuine memory pressure (the AT:P precondition in the CVSS 4.0 vector, base score 2.0), and the independent assessment caps impact at low availability loss with no confidentiality or integrity effect. The condition is not attacker-deterministic under ordinary conditions, no public exploit code has been identified at time of analysis, and this is not confirmed actively exploited (no CISA KEV listing), making it a genuinely low-priority issue whose signals are consistent rather than conflicting.
RemediationAI
Upgrade to ImageMagick 7.1.2-32 or later, which contains the corrected safe-growth logic in MagickCore/fx.c; the advisory at https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-v2x3-wpmg-c4w6 documents the release, and the specific code change can be backported from upstream commit https://github.com/ImageMagick/ImageMagick/commit/fb743d60700c9bc350c3d2a0b48b998bdabc466c for distributors maintaining older 7.1.0-x branches. Vendor-released patch: ImageMagick 7.1.2-32. Where upgrading is not immediately possible, the most effective compensating control is to stop passing attacker-controlled -fx expressions into ImageMagick (whitelist or statically pre-compute expressions, or reject the option at the wrapper layer), accepting that any legitimate -fx-driven workflow must be refactored or temporarily disabled; secondary hardening is to run conversions in an isolated, low-privilege worker or container with minimal filesystem and no shared credentials so that a memory-corruption crash cannot affect other tenants. Note that tightening memory limits (via policy.xml or MAGICK_MEMORY_LIMIT) does not remediate the flaw and could actually make the allocation-failure precondition easier to reach on unpatched builds, so it should be treated as containment for post-patch defense in depth only, not as a substitute for upgrading.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerable code lives in MagickCore/fx.c, the reverse-Polish-notation (RPN) expression compiler/evaluator that backs ImageMagick's -fx option. As tokens are parsed, AddElement grows a fixed-size ElementT array via ExtendRPN, which multiplies numElements by (1 + TableExtend) and calls ResizeMagickMemory on pfx->Elements. ResizeMagickMemory behaves like realloc: on failure the original block is released and the returned pointer is NULL, yet the pre-patch code assigned that result directly to pfx->Elements and left the previous size field untouched, so subsequent token insertion in AddElement could write through a dangling/reallocated-out buffer - the freed-memory access described in the advisory. The upstream fix (commit fb743d60700c9bc350c3d2a0b48b998bdabc466c) replaces this with a safe growth path: a fresh buffer is obtained with AcquireQuantumMemory into a temporary, the live elements are copied with memcpy, the old block is relinquished only after the new allocation succeeds, and pfx->Elements/numElements are updated atomically; AddElement additionally rolls back ++pfx->usedElements and bails out if ExtendRPN fails or the table is NULL. Note the classification mismatch across feeds: the description and vendor advisory frame this as a use-after-free, while the supplied CWE is CWE-476 (NULL pointer dereference) and the source tags include 'Null Pointer Dereference', 'Buffer Overflow' and 'Denial Of Service' - the practical failure modes are a crash or memory corruption rather than a controlled hijack. These faults are latent in any deployment that embeds ImageMagick's coders/evaluator, so the CPE cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:* (version-agnostic) implies NVD-style coverage that is broader than the version range actually patched.
Know when Imagemagick gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Local -fx input (AV:L) with a non-deterministic allocation-failure precondition (AC:H) by a low-privileged user (PR:L); only a crash results, so C:N/I:N and A:L.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
ImageMagick 7.1.0-20 before 7.1.2-32 contains a use after free vulnerability in the -fx option that occurs when a memory allocation fails during a specific operation. Attackers who can supply crafted -fx expressions under memory pressure can trigger freed memory access, causing crashes or memory corruption.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A null pointer dereference occurs when a program attempts to access memory through a pointer that has been set to NULL (address 0x0).
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
More in Imagemagick
View allThe (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.
The (1) HTTP and (2) FTP coders in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allow remote attackers to conduct
The EPHEMERAL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to delete arbitrary fi
ReadGIFImage in coders/gif.c in ImageMagick 7.0.6-1 and GraphicsMagick 1.3.26 leaves the palette uninitialized when proc
Integer overflow in MagickCore/profile.c in ImageMagick before 7.0.2-1 allows remote attackers to cause a denial of serv
The LABEL coder in ImageMagick before 6.9.3-10 and 7.x before 7.0.1-1 allows remote attackers to read arbitrary files vi
The OpenBlob function in blob.c in GraphicsMagick before 1.3.24 and ImageMagick allows remote attackers to execute arbit
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
The ReadDCMImage function in DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to
The DCM reader in ImageMagick before 6.9.4-5 and 7.x before 7.0.1-7 allows remote attackers to have unspecified impact b
ImageMagick 7.0.6-5 has a memory leak vulnerability in ReadWEBPImage in coders/webp.c because memory is not freed in cer
Heap buffer overflow in ImageMagick's XBM image decoder (ReadXBMImage) lets remote attackers write attacker-controlled d
EUVD-2026-97582
GHSA-ccrh-8v96-4jhw
NVD
CVE.org
EPSS
Exploit-DB