OESA-2022-1579 (CVE-2021-39212)
Vulnerability from osv_openeuler – Published: 2022-03-19 11:04 – Updated: 2026-08-06 11:04 – Source websiteUse ImageMagick to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
Security Fix(es):
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}" />.(CVE-2021-39212)
A NULL pointer dereference flaw was found in ImageMagick in versions prior to 7.0.10-31 in ReadSVGImage() in coders/svg.c. This issue is due to not checking the return value from libxml2's xmlCreatePushParserCtxt() and uses the value directly, which leads to a crash and segmentation fault.(CVE-2021-3596)
| URL | Type | |
|---|---|---|
{
"affected": [
{
"ecosystem_specific": {
"aarch64": [
"ImageMagick-c++-devel-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-help-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-debuginfo-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-debugsource-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-c++-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-devel-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-perl-6.9.12.42-1.oe1.aarch64.rpm"
],
"src": [
"ImageMagick-6.9.12.42-1.oe1.src.rpm"
],
"x86_64": [
"ImageMagick-c++-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-debugsource-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-perl-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-help-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-debuginfo-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-c++-devel-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-devel-6.9.12.42-1.oe1.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:20.03-LTS-SP1",
"name": "ImageMagick",
"purl": "pkg:rpm/openEuler/ImageMagick\u0026distro=openEuler-20.03-LTS-SP1"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.9.12.42-1.oe1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"ImageMagick-debugsource-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-devel-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-perl-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-help-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-c++-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-debuginfo-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-c++-devel-6.9.12.42-1.oe1.aarch64.rpm"
],
"src": [
"ImageMagick-6.9.12.42-1.oe1.src.rpm"
],
"x86_64": [
"ImageMagick-c++-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-perl-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-debuginfo-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-debugsource-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-c++-devel-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-help-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-devel-6.9.12.42-1.oe1.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:20.03-LTS-SP2",
"name": "ImageMagick",
"purl": "pkg:rpm/openEuler/ImageMagick\u0026distro=openEuler-20.03-LTS-SP2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.9.12.42-1.oe1"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"ecosystem_specific": {
"aarch64": [
"ImageMagick-debuginfo-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-debugsource-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-devel-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-c++-devel-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-c++-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-perl-6.9.12.42-1.oe1.aarch64.rpm",
"ImageMagick-help-6.9.12.42-1.oe1.aarch64.rpm"
],
"src": [
"ImageMagick-6.9.12.42-1.oe1.src.rpm"
],
"x86_64": [
"ImageMagick-debugsource-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-devel-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-perl-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-c++-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-debuginfo-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-c++-devel-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-help-6.9.12.42-1.oe1.x86_64.rpm",
"ImageMagick-6.9.12.42-1.oe1.x86_64.rpm"
]
},
"package": {
"ecosystem": "openEuler:20.03-LTS-SP3",
"name": "ImageMagick",
"purl": "pkg:rpm/openEuler/ImageMagick\u0026distro=openEuler-20.03-LTS-SP3"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "6.9.12.42-1.oe1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"severity": "Medium"
},
"details": "Use ImageMagick to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, HEIC, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and B\u00e9zier curves.\r\n\r\nSecurity Fix(es):\r\n\r\nImageMagick 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. \u0026lt;policy domain=\u0026quot;module\u0026quot; rights=\u0026quot;none\u0026quot; pattern=\u0026quot;PS\u0026quot; /\u0026gt;. 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: \u0026lt;policy domain=\u0026quot;coder\u0026quot; rights=\u0026quot;none\u0026quot; pattern=\u0026quot;{PS,EPI,EPS,EPSF,EPSI}\u0026quot; /\u0026gt;.(CVE-2021-39212)\r\n\r\nA NULL pointer dereference flaw was found in ImageMagick in versions prior to 7.0.10-31 in ReadSVGImage() in coders/svg.c. This issue is due to not checking the return value from libxml2\u0026apos;s xmlCreatePushParserCtxt() and uses the value directly, which leads to a crash and segmentation fault.(CVE-2021-3596)",
"id": "OESA-2022-1579",
"modified": "2026-08-06T11:04:51Z",
"published": "2022-03-19T11:04:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1579"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-39212"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3596"
}
],
"schema_version": "1.7.2",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "ImageMagick security update",
"upstream": [
"CVE-2021-39212",
"CVE-2021-3596"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.