CVE-2021-39212 Issue when Configuring the ImageMagick Security Policy
Attackers can bypass security policies to read or write Postscript files if module-based restrictions are used instead of coder-based ones.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-39212?
CVE-2021-39212 is a medium-severity vulnerability in Imagemagick Imagemagick, published on 13 Sep 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may use, copy, modify, and distribute in both open and proprietary applications. In affected versions and in certain cases, Postscript files could be read and written when specifically excluded by a `module` policy in `policy.xml`. ex. <policy domain="module" rights="none" pattern="PS" />. The issue has been resolved in ImageMagick 7.1.0-7 and in 6.9.12-22. Fortunately, in the wild, few users utilize the `module` policy and instead use the `coder` policy that is also our workaround recommendation: <policy domain="coder" rights="none" pattern="{PS,EPI,EPS,EPSF,EPSI}" />.
Which versions are affected by CVE-2021-39212?
It affects 1 product.
Products include Imagemagick Imagemagick.
How do I fix CVE-2021-39212?
Upgrade to a fixed version.
Is CVE-2021-39212 being exploited?
There is no known exploitation of CVE-2021-39212 in the wild and no public exploit code.
Other vulnerabilities in Imagemagick Imagemagick
Sources
Also known as DEBIAN-CVE-2021-39212, GHSA-qvhr-jj4p-j2qr, JLSEC-2026-890, UBUNTU-CVE-2021-39212.