CVEfocus › CVE database › CVE-2021-39212

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

CVSS 4.4 MediumEPSS 0.4% (higher than 21% of CVEs)Published 2021-09-13Updated 2024-08-04Assigner: GitHub_M

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

CWE-668

What to do

Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

16Fixed
2Fix pending
12Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04imagemagickFix pending8:6.9.11.60+dfsg-1.3ubuntu0.22.04.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2021-39212
Ubuntu 20.04imagemagickFixed8:6.9.10.23+dfsg-2.1ubuntu11.9UBUNTU-CVE-2021-39212
Ubuntu 16.04imagemagickFix pending
Debian 14imagemagickFixed8:6.9.11.60+dfsg-1.5DEBIAN-CVE-2021-39212
Debian 13imagemagickFixed8:6.9.11.60+dfsg-1.5DEBIAN-CVE-2021-39212
Debian 12imagemagickFixed8:6.9.11.60+dfsg-1.5DEBIAN-CVE-2021-39212
Red Hat Enterprise Linux 7ImageMagickWill not fix
Out of support scope
Red Hat Enterprise Linux 7ImageMagick-c++Will not fix
Out of support scope
Red Hat Enterprise Linux 7ImageMagick-c++-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7ImageMagick-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7ImageMagick-docWill not fix
Out of support scope
Red Hat Enterprise Linux 7ImageMagick-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 6ImageMagickWill not fix
Out of support scope
Red Hat Enterprise Linux 6ImageMagick-c++Will not fix
Out of support scope
Red Hat Enterprise Linux 6ImageMagick-c++-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6ImageMagick-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6ImageMagick-docWill not fix
Out of support scope
Red Hat Enterprise Linux 6ImageMagick-perlWill not fix
Out of support scope
Alpine Linux 3.24imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.23imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.22imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.21imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.20imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.19imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.18imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.17imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.16imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.16imagemagick6Fixed6.9.12.31-r0ALPINE-CVE-2021-39212
Alpine Linux 3.15imagemagickFixed7.1.0.10-r0ALPINE-CVE-2021-39212
Alpine Linux 3.15imagemagick6Fixed6.9.12.31-r0ALPINE-CVE-2021-39212

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.