Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRun magick script with restrictive path policy
-
ExploitSwap checked path for symlink mid-execution
-
ImpactWin TOCTOU race and read policy-restricted file
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires that ImageMagick be configured with a path-restricting security policy (policy.xml ReadPolicyRights) that blocks access to certain files, AND that the attacker can already invoke a magick script (the MagickWand script-token path), i.e. PR:L local access. The attacker must then win a TOCTOU race (AT:P) by replacing an authorized path with a symlink in the window between the policy check and the file open - a non-deterministic step that typically requires repeated attempts. Key limiting factors: it is local-only (AV:L), confers no benefit on default installations that do not deploy a restrictive read policy (if nothing is policy-blocked there is nothing to bypass), yields only file-read disclosure, and the timing race reduces reliability. |
| Impact | This is a genuinely low-priority issue, and the signals agree rather than conflict. The vendor-supplied CVSS 4.0 vector (AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N) scores only 2.0: exploitation is local, requires existing low privileges (the ability to invoke a magick script), depends on winning a non-deterministic TOCTOU race (AT:P), and yields only low confidentiality impact (VC:L) with no integrity or availability effect. There is no CISA KEV listing and no public exploit identified, so the status is 'no public exploit identified at time of analysis.' EPSS was not provided in the input, so probabilistic exploitation likelihood cannot be quantified - but given the local-only vector, the privilege prerequisite, and the race-condition timing requirement, real-world mass exploitation is implausible. The commit evidence corroborates the description (the fix adds O_NOFOLLOW on open and re-validates IsPathAuthorized after opening), confirming this is a file-read policy bypass rather than a code-execution or authentication flaw. Net: a real but narrow local information-disclosure weakness, not an urgent remediation priority despite ImageMagick's wide footprint. |
| Exploit ScenarioDerived | A local user permitted to run ImageMagick magick scripts under a restrictive path security policy repeatedly executes a script referencing a benign, policy-approved path, then swaps that path for a symlink pointing at a policy-restricted file in the window between the authorization check and the file open. By winning this timing race, the attacker reads the contents of a file the policy was meant to block. No public exploit is identified, and success requires local access plus repeated attempts to win the non-deterministic race. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 12, 2026
Local file disclosure in ImageMagick before 7.1.2-32 stems from a time-of-check time-of-use symlink race in the MagickWand script-token loader, which lets an attacker who can already invoke a magick script replace an authorized path with a symlink in the window between the policy check and the actual file open. The impact is limited: it only matters on installations that deploy a restrictive policy.xml ReadPolicyRights (there is nothing to bypass on default configurations), the attacker must win a non-deterministic race, and the result is read-only disclosure of files the policy intends to block - consistent with the low assessed severity. No public exploit was identified at time of analysis, the issue is not listed in CISA KEV, and a vendor-released patch is available in ImageMagick 7.1.2-32.
RemediationAI
Vendor-released patch: upgrade ImageMagick to 7.1.2-32 or later; the fix is contained in commit 9e789499e67dbf5c4ee9fe1b72690738c799ec73, which replaces the plain fopen_utf8() call in MagickWand/script-token.c with open(filename, O_RDONLY | O_CLOEXEC | O_NOFOLLOW) followed by a post-open IsPathAuthorized(ReadPolicyRights, filename) re-check, closing both the symlink-following and the check/open gap - see the advisory at https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-7q74-r26w-fwcx for the official guidance. If upgrading is not immediately possible, note that the vulnerability is only reachable when a restrictive policy.xml ReadPolicyRights is in force, so temporary options are to run magick scripts only from trusted local users (the assessed vector is PR:L, so removing untrusted script invocation removes the attack surface entirely), and to place policy-blocked files under OS-level mandatory access controls such as SELinux or AppArmor, which confine reads independently of ImageMagick's own path checks - the trade-off being added administrative overhead and possible breakage of legitimate image workflows. Because the race is non-deterministic, relying on retry-time unpredictability is not a control. Avoid the tempting 'workaround' of simply deleting the restrictive read policy, which would restore functionality but also remove the very protection the policy exists to provide.
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 flaw is a classic TOCTOU (time-of-check time-of-use) symlink race, classified under CWE-59 (Improper Link Resolution Before File Access, i.e. 'link following'). ImageMagick's path security model is driven by policy.xml, which can set ReadPolicyRights to restrict which files the library may read. The affected code lives in MagickWand/script-token.c, in AcquireScriptTokenInfo(), the loader used when ImageMagick executes a magick script; the original implementation called fopen_utf8() on the supplied filename and only then consulted IsPathAuthorized(ReadPolicyRights, filename). Because the authorization check and the open are separate operations on a pathname, an attacker able to influence that pathname can point it at an allowed file at check time and swap in a symlink to a denied file before the open resolves it, so the read bypasses the policy. The upstream fix (commit 9e789499e67dbf5c4ee9fe1b72690738c799ec73) opens the file with open(filename, O_RDONLY | O_CLOEXEC | O_NOFOLLOW), wraps the descriptor via fdopen(), and additionally re-validates IsPathAuthorized(ReadPolicyRights, filename) before accepting the stream - O_NOFOLLOW prevents the final path component from being a symlink, and the post-open policy re-check narrows the race window. The CPE feed classifies the affected product as cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*, a wildcarded entry that does not itself pin a version range, so the version boundary must be taken from the GHSA-7q74-r26w-fwcx advisory and the commit reference. The underlying technology is the ImageMagick image-processing library and its scripting interface, meaning exposure is limited to deployments that both use magick scripts and have opted into a restrictive read policy.
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:L/VI:N/VA:N/SC:N/SI:N/SA:N
Local script execution needs existing low privilege (PR:L), the symlink TOCTOU timing race makes it AC:H, and impact is a single policy-restricted file read, so C:L with I:N/A:N and no scope change.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
ImageMagick before 7.1.2-32 contains a time-of-check time-of-use symlink race vulnerability that allows attackers to bypass the path security policy when executing a magick script. Attackers can swap a checked path with a symlink during script execution to read files that the security policy is meant to block.
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
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-97718
GHSA-849g-2wm5-pm7c
NVD
CVE.org
EPSS
Exploit-DB