Description
ImageMagick on Windows through 7.1.2-33 and 6.9.13-58 contains an uncontrolled search path vulnerability in NTGhostscriptEXE() that launches gswin64c.exe by bare name when Ghostscript is unregistered. Attackers can plant a malicious gswin64c.exe in the working directory to execute code with ImageMagick privileges when PDF, PostScript, or EPS files are converted.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
ImageMagick ImageMagick
Default version status: unaffected
7.0.0-0 to ≤ 7.1.2-33affected0 to ≤ 6.9.13-58affected
pkg:github/ImageMagick/ImageMagickReferences
- https://github.com/ghostx-86/exploitarium/tree/main/imagemagick-gs-delegate-hijack-poc ↗
- https://github.com/ImageMagick/ImageMagick/blob/211e5b975a0019a88dcef5f84c1193f46738d815/MagickCore/nt-base.c#L1469-L1511 ↗
- https://github.com/ImageMagick/ImageMagick/blob/211e5b975a0019a88dcef5f84c1193f46738d815/MagickCore/nt-base.c#L2829-L2832 ↗
- https://github.com/ImageMagick/ImageMagick ↗
- https://www.vulncheck.com/advisories/imagemagick-through-7.1.2-33-and-6.9.13-58-uncontrolled-search-path-via-ghostscript-delegate ↗