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).

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-2022-1270HIGH7.8
  • ImageMagickImageMagick
  • ImageMagick-config-6-SUSE
NoYesSep 28, 2022
CVE-2020-21679MEDIUM5.5
  • ImageMagickImageMagick
  • graphicsmagick
NoYesAug 22, 2023
CVE-2025-27796MEDIUM4.5
  • GraphicsMagickGraphicsMagick
  • GraphicsMagick-debugsource
NoYesMar 07, 2025
CVE-2025-27795MEDIUM4.3
  • GraphicsMagickGraphicsMagick
  • GraphicsMagick-perl
NoYesMar 07, 2025
CVE-2025-32460MEDIUM4
  • GraphicsMagickGraphicsMagick
  • GraphicsMagick-devel
NoYesApr 09, 2025

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