CVE-2019-12921
GraphicsMagick vulnerability analysis and mitigation

Overview

CVE-2019-12921 is a vulnerability discovered in GraphicsMagick before version 1.3.32, where the text filename component allows remote attackers to read arbitrary files via a crafted image because of TranslateTextEx for SVG. The vulnerability was discovered on June 6, 2019, and was patched on June 15, 2019 (GitHub PoC).

Technical details

The vulnerability affects multiple decoders that use MVG syntax by default. The issue occurs in the AnnotateImage function in annotate.c, where TranslateTextEx accepts '@' as a local file reference. The SVG coder does not properly escape characters when reading xlink:href attributes, allowing MVG commands to be injected. Additionally, the SetImageAttribute function does not properly translate comments and labels, enabling attackers to access file contents when image attributes are written for formats like JPEG and GIF (GitHub PoC).

Impact

The vulnerability allows malicious users to access sensitive local file contents. While the proof of concept demonstrated access to /etc/passwd, more critical files could be targeted, including SSH private keys used for host authentication, password-containing configuration files like Mercurial's hgrc, or X11's .Xauthority file on active desktop systems (GitHub PoC).

Exploitability

The vulnerability can be exploited by converting a specially crafted SVG file to another format using the GraphicsMagick convert command. The exploit involves injecting custom TextPrimitive inside ImagePrimitive at the MVG coder, and the file contents can be retrieved from the image attributes (comments section) of the converted file (GitHub PoC).

Mitigation and workarounds

The vulnerability was fixed in GraphicsMagick version 1.3.32. Various distributions have released security updates to address this issue: Debian 8 'Jessie' fixed it in version 1.3.20-3+deb8u9, Debian 9 'Stretch' in version 1.3.30+hg15796-1~deb9u4, and Debian 10 'Buster' in version 1.4+really1.3.35-1~deb10u1 (Debian Security, Debian LTS).

Additional resources


SourceThis report was generated using AI

Related GraphicsMagick vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-56379CRITICAL9.2
  • ImageMagick logoImageMagick
  • imagemagick
NoYesJun 23, 2026
CVE-2026-77118HIGH8.4
  • GraphicsMagick logoGraphicsMagick
  • cpe:2.3:a:graphicsmagick:graphicsmagick
NoYesAug 20, 2026
CVE-2026-61870LOW2.1
  • ImageMagick logoImageMagick
  • libMagick++-7_Q16HDRI5
NoYesJul 11, 2026
CVE-2026-61464LOW1
  • ImageMagick logoImageMagick
  • ImageMagick-c++-devel
NoYesJul 15, 2026
CVE-2026-13606NONEN/A
  • GraphicsMagick logoGraphicsMagick
  • GraphicsMagick-doc
NoYesJun 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management