ImageMagick mogrify buffer overflow vulnerability (Oct 21 2016)

By

A buffer overflow vulnerability(CVE-2016-7799)exists in ImageMagick.ImageMagick is used to create, edit, compose, or convert bitmap images.A buffer overflow exists in Imagemagick’s mogrify command. The mogrify program is used to resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.

Images have EXIF tags which are metadata containing focal lengths, exposures, dates, and in some cases GPS locations of the image file. When a image file with malformed EXIF tag is processed by ImageMagick mogrify program a buffer overflow occurs.This is because code in SyncExifProfile function,cannot handle the wrong EXIF tags.Successful exploitation could lead to arbitrary code execution.

Looking at the patch one can see the vulnerable SyncExifProfile function does not validate the EXIF values correctly.

The malformed data in the image file

Dell SonicWALL Threat Research Team has researched this vulnerability and released following signature to protect their customers.

  • SPY 1378 :Malformed-File jpg.TL.10
  • SPY 1386 :Malformed-File jpg.TL.11
Security News
The SonicWall Capture Labs Threat Research Team gathers, analyzes and vets cross-vector threat information from the SonicWall Capture Threat network, consisting of global devices and resources, including more than 1 million security sensors in nearly 200 countries and territories. The research team identifies, analyzes, and mitigates critical vulnerabilities and malware daily through in-depth research, which drives protection for all SonicWall customers. In addition to safeguarding networks globally, the research team supports the larger threat intelligence community by releasing weekly deep technical analyses of the most critical threats to small businesses, providing critical knowledge that defenders need to protect their networks.