Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CVE-2026-25965
Summary
ImageMagick is free and open-source software used for editing and manipulating digital images. In ImageMagick versions prior to 6.9.13-40 and 7.x prior to 7.1.2-14 and Magick.NET versions prior to 14.10.3, ImageMagicks path security policy is enforced on the raw filename string before the filesystem resolves it. As a result, a policy rule such as "/etc/*" can be bypassed by a Path Traversal. The OS resolves the traversal and opens the sensitive file, but the policy matcher only sees the unnormalized path and therefore allows the read. This enables local file disclosure (LFI) even when "policy-secure.xml" is applied. Actions to prevent reading from files have been taken in versions .7.1.2-15 and 6.9.13-40 But it make sure writing is also not possible the following should be added to one's policy. This will also be included in ImageMagick's more secure policies by default. ImageMagick versions 7.1.2-14 and 6.9.13-40 and Magick.NET version 14.10.3 contain a patch for this vulnerability.
- LOW
- NETWORK
- NONE
- UNCHANGED
- NONE
- NONE
- HIGH
- NONE
CWE-22 - Path Traversal
Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.
References
Advisory Timeline
- Published