What’s Vulnerable › Vulnerabilities
CVE-2021-39212: Issue when Configuring the ImageMagick Security Policy
- Severity: low (CVSS 3.6 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-09-13 · updated 2026-06-17
- Weakness: CWE-668
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}" />.
Affected products
- ImageMagick: from 6.9.12-0 before 6.9.12-22; from 7.1.0-0 before 7.1.0-7 — fixed in 6.9.12-22, 7.1.0-7
How to fix
Upgrade to a fixed version: ImageMagick 6.9.12-22, 7.1.0-7. Check the vendor advisory for mitigations.
References
- https://github.com/ImageMagick/ImageMagick/commit/01faddbe2711a4156180c4a92837e2f23683cc68
- https://github.com/ImageMagick/ImageMagick/commit/35893e7cad78ce461fcaffa56076c11700ba5e4e
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qvhr-jj4p-j2qr
- https://lists.debian.org/debian-lts-announce/2023/05/msg00020.html
- https://github.com/ImageMagick/ImageMagick/commit/01faddbe2711a4156180c4a92837e2f23683cc68
- https://github.com/ImageMagick/ImageMagick/commit/35893e7cad78ce461fcaffa56076c11700ba5e4e
- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qvhr-jj4p-j2qr
- https://lists.debian.org/debian-lts-announce/2023/05/msg00020.html
Get alerted when CVE-2021-39212 or the next vulnerability affects your stack